summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_rules_edit.php
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-01-01 10:17:39 +0545
committerGitHub <noreply@github.com>2017-01-01 10:17:39 +0545
commit23057964d81019e8ed3adc944c77ca8a1a9c178f (patch)
tree404d134c04e8f29fe386407492e47c5c4caaf012 /src/usr/local/www/firewall_rules_edit.php
parent56110c7249b5dbd9ea4e0b4c4009794c69a58143 (diff)
downloadpfsense-23057964d81019e8ed3adc944c77ca8a1a9c178f.zip
pfsense-23057964d81019e8ed3adc944c77ca8a1a9c178f.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.
Diffstat (limited to 'src/usr/local/www/firewall_rules_edit.php')
-rw-r--r--src/usr/local/www/firewall_rules_edit.php6
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 6cea900..3877705 100644
--- a/src/usr/local/www/firewall_rules_edit.php
+++ b/src/usr/local/www/firewall_rules_edit.php
@@ -423,6 +423,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) {
OpenPOWER on IntegriCloud