diff --git a/src/detections/detection.rs b/src/detections/detection.rs index 2f4e6207..c1267928 100644 --- a/src/detections/detection.rs +++ b/src/detections/detection.rs @@ -25,6 +25,7 @@ use crate::filter; use crate::yaml::ParseYaml; use hashbrown::HashMap; use serde_json::Value; +use std::ascii::AsciiExt; use std::fmt::Write; use std::path::Path; @@ -264,7 +265,10 @@ impl Detection { "%Channel%" => { profile_converter.insert( "%Channel%".to_string(), - CH_CONFIG.get(ch_str).unwrap_or(ch_str).to_string(), + CH_CONFIG + .get(&ch_str.to_ascii_lowercase()) + .unwrap_or(ch_str) + .to_string(), ); } "%Level%" => { diff --git a/src/detections/message.rs b/src/detections/message.rs index e3a3d235..1335f682 100644 --- a/src/detections/message.rs +++ b/src/detections/message.rs @@ -105,10 +105,10 @@ pub fn create_output_filter_config(path: &str) -> HashMap { return; } - let tag_full_str = line[0].trim(); + let tag_full_str = line[0].trim().to_ascii_lowercase(); let tag_replace_str = line[1].trim(); - ret.insert(tag_full_str.to_owned(), tag_replace_str.to_owned()); + ret.insert(tag_full_str, tag_replace_str.to_owned()); }); ret }