diff options
author | Phil Davis <phil.davis@inf.org> | 2017-01-01 10:17:39 +0545 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2017-01-02 08:50:41 -0200 |
commit | fafdd8f0104e54dda087cf82b2f624e9b9eb06f7 (patch) | |
tree | 03628eac605d04429bcab8b32ad22c3fc289b138 | |
parent | b961bc234c9c8fc7c368442e36385ca3f85feba7 (diff) | |
download | pfsense-fafdd8f0104e54dda087cf82b2f624e9b9eb06f7.zip pfsense-fafdd8f0104e54dda087cf82b2f624e9b9eb06f7.tar.gz |
Fix #7059 Set expected icmptypes format
icmptype is a comma-separated list in the config. When attempting to save, the array in $_POST['icmptype'] needs to be put into this format in $pconfig in case there are input errors and the user-entered data need to be re-displayed for correction.
(cherry picked from commit 23057964d81019e8ed3adc944c77ca8a1a9c178f)
-rw-r--r-- | src/usr/local/www/firewall_rules_edit.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index f37ecc2..5762b45 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -460,6 +460,12 @@ if ($_POST) { $pconfig = $_POST; + if (($_POST['proto'] == "icmp") && count($_POST['icmptype'])) { + $pconfig['icmptype'] = implode(',', $_POST['icmptype']); + } else { + unset($pconfig['icmptype']); + } + /* input validation */ $reqdfields = explode(" ", "type proto"); if (isset($a_filter[$id]['associated-rule-id']) === false) { |