diff options
author | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-03 11:17:55 -0400 |
---|---|---|
committer | bmeeks8 <bmeeks8@bellsouth.net> | 2014-09-03 11:17:55 -0400 |
commit | 2c4435fa4db6a4d24d7faf0b4cdbd7cde8d73089 (patch) | |
tree | 1ec27815d6b6f9844844005e03bf565ca13630d2 | |
parent | b9dd2b74d87b1664360bd467b37baf604c53de30 (diff) | |
download | pfsense-packages-2c4435fa4db6a4d24d7faf0b4cdbd7cde8d73089.tar.gz pfsense-packages-2c4435fa4db6a4d24d7faf0b4cdbd7cde8d73089.tar.bz2 pfsense-packages-2c4435fa4db6a4d24d7faf0b4cdbd7cde8d73089.zip |
Strip any CR characters that may get pasted into some control fields.
-rw-r--r-- | config/suricata/suricata_barnyard.php | 2 | ||||
-rw-r--r-- | config/suricata/suricata_interfaces_edit.php | 2 | ||||
-rw-r--r-- | config/suricata/suricata_passlist_edit.php | 2 | ||||
-rw-r--r-- | config/suricata/suricata_rules.php | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/config/suricata/suricata_barnyard.php b/config/suricata/suricata_barnyard.php index 630a3c35..f762477e 100644 --- a/config/suricata/suricata_barnyard.php +++ b/config/suricata/suricata_barnyard.php @@ -158,7 +158,7 @@ if ($_POST['save']) { if ($_POST['barnyard_syslog_priority']) $natent['barnyard_syslog_priority'] = $_POST['barnyard_syslog_priority']; else $natent['barnyard_syslog_priority'] = 'LOG_INFO'; if ($_POST['barnyard_bro_ids_rhost']) $natent['barnyard_bro_ids_rhost'] = $_POST['barnyard_bro_ids_rhost']; else unset($natent['barnyard_bro_ids_rhost']); if ($_POST['barnyard_bro_ids_dport']) $natent['barnyard_bro_ids_dport'] = $_POST['barnyard_bro_ids_dport']; else $natent['barnyard_bro_ids_dport'] = '47760'; - if ($_POST['barnconfigpassthru']) $natent['barnconfigpassthru'] = base64_encode($_POST['barnconfigpassthru']); else unset($natent['barnconfigpassthru']); + if ($_POST['barnconfigpassthru']) $natent['barnconfigpassthru'] = base64_encode(str_replace("\r\n", "\n", $_POST['barnconfigpassthru'])); else unset($natent['barnconfigpassthru']); $a_nat[$id] = $natent; write_config(); diff --git a/config/suricata/suricata_interfaces_edit.php b/config/suricata/suricata_interfaces_edit.php index a3b2e78a..ff21b48f 100644 --- a/config/suricata/suricata_interfaces_edit.php +++ b/config/suricata/suricata_interfaces_edit.php @@ -300,7 +300,7 @@ if ($_POST["save"] && !$input_errors) { if ($_POST['eve_log_files'] == "on") { $natent['eve_log_files'] = 'on'; }else{ $natent['eve_log_files'] = 'off'; } if ($_POST['eve_log_ssh'] == "on") { $natent['eve_log_ssh'] = 'on'; }else{ $natent['eve_log_ssh'] = 'off'; } if ($_POST['delayed_detect'] == "on") { $natent['delayed_detect'] = 'on'; }else{ $natent['delayed_detect'] = 'off'; } - if ($_POST['configpassthru']) $natent['configpassthru'] = base64_encode($_POST['configpassthru']); else unset($natent['configpassthru']); + if ($_POST['configpassthru']) $natent['configpassthru'] = base64_encode(str_replace("\r\n", "\n", $_POST['configpassthru'])); else unset($natent['configpassthru']); $if_real = get_real_interface($natent['interface']); if (isset($id) && $a_rule[$id] && $action == '') { diff --git a/config/suricata/suricata_passlist_edit.php b/config/suricata/suricata_passlist_edit.php index 0a9a8132..3e1502f3 100644 --- a/config/suricata/suricata_passlist_edit.php +++ b/config/suricata/suricata_passlist_edit.php @@ -171,7 +171,7 @@ if ($_POST['save']) { $p_list['vpnips'] = $_POST['vpnips']? 'yes' : 'no'; $p_list['address'] = $_POST['address']; - $p_list['descr'] = mb_convert_encoding($_POST['descr'],"HTML-ENTITIES","auto"); + $p_list['descr'] = mb_convert_encoding(str_replace("\r\n", "\n", $_POST['descr']),"HTML-ENTITIES","auto"); $p_list['detail'] = $final_address_details; if (isset($id) && $a_passlist[$id]) 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']}."); |