aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort/snort_rules.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-10 15:37:38 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-09-10 15:37:38 -0400
commit7bde87a1a8f4ab631a3a3f8e0907b80f28fa6a5b (patch)
tree728f981081527ae67d57790e11b3e2dabdd6de11 /config/snort/snort_rules.php
parent46998b31ae1a4c3c01ef2fe4f14696f12ace5308 (diff)
downloadpfsense-packages-7bde87a1a8f4ab631a3a3f8e0907b80f28fa6a5b.tar.gz
pfsense-packages-7bde87a1a8f4ab631a3a3f8e0907b80f28fa6a5b.tar.bz2
pfsense-packages-7bde87a1a8f4ab631a3a3f8e0907b80f28fa6a5b.zip
Scrub CR/LF sequences that may come from copy-paste and replace with LF.
Diffstat (limited to 'config/snort/snort_rules.php')
-rwxr-xr-xconfig/snort/snort_rules.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/config/snort/snort_rules.php b/config/snort/snort_rules.php
index 013b7d84..a459b293 100755
--- a/config/snort/snort_rules.php
+++ b/config/snort/snort_rules.php
@@ -389,7 +389,7 @@ elseif ($_POST['clear']) {
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("Snort pkg: save modified custom rules for {$a_rule[$id]['interface']}.");