From 2c4435fa4db6a4d24d7faf0b4cdbd7cde8d73089 Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Wed, 3 Sep 2014 11:17:55 -0400 Subject: Strip any CR characters that may get pasted into some control fields. --- config/suricata/suricata_rules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config/suricata/suricata_rules.php') diff --git a/config/suricata/suricata_rules.php b/config/suricata/suricata_rules.php index f9d8fe07..aa420371 100644 --- a/config/suricata/suricata_rules.php +++ b/config/suricata/suricata_rules.php @@ -383,7 +383,7 @@ elseif ($_POST['cancel']) { elseif ($_POST['save']) { $pconfig['customrules'] = $_POST['customrules']; if ($_POST['customrules']) - $a_rule[$id]['customrules'] = base64_encode($_POST['customrules']); + $a_rule[$id]['customrules'] = base64_encode(str_replace("\r\n", "\n", $_POST['customrules'])); else unset($a_rule[$id]['customrules']); write_config("Suricata pkg: save modified custom rules for {$a_rule[$id]['interface']}."); -- cgit v1.2.3