diff options
author | Phil Davis <phil.davis@inf.org> | 2017-03-28 15:43:09 +0545 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-03-28 09:10:58 -0400 |
commit | ea846d7848ec0c6f4d29855207a61715adb55988 (patch) | |
tree | 1b07e8143b647acd84a84fed24059c1206d9cf40 /src/usr/local | |
parent | 00203af2f43d7cdda8cb14569108e7ae845c71fb (diff) | |
download | pfsense-ea846d7848ec0c6f4d29855207a61715adb55988.zip pfsense-ea846d7848ec0c6f4d29855207a61715adb55988.tar.gz |
Redmine #7435 Fix edit problems due to POST id code
Diffstat (limited to 'src/usr/local')
4 files changed, 22 insertions, 13 deletions
diff --git a/src/usr/local/www/services_captiveportal_vouchers_edit.php b/src/usr/local/www/services_captiveportal_vouchers_edit.php index 20b02cd..3e7a96b 100644 --- a/src/usr/local/www/services_captiveportal_vouchers_edit.php +++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php @@ -252,7 +252,7 @@ if (isset($id) && $a_roll[$id]) { 'id', null, 'hidden', - $pconfig['id'] + $id )); } diff --git a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php index 98c2c27..8b33212 100644 --- a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php +++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php @@ -198,7 +198,7 @@ if (isset($id) && $a_domainOverrides[$id]) { 'id', null, 'hidden', - $pconfig['id'] + $id )); } diff --git a/src/usr/local/www/services_dnsmasq_edit.php b/src/usr/local/www/services_dnsmasq_edit.php index 3f1bcee..77d9c5c 100644 --- a/src/usr/local/www/services_dnsmasq_edit.php +++ b/src/usr/local/www/services_dnsmasq_edit.php @@ -165,11 +165,15 @@ if ($_POST) { } if (($hostent['host'] == $_POST['host']) && - ($hostent['domain'] == $_POST['domain']) && - ((is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) || - (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])))) { - $input_errors[] = gettext("This host/domain already exists."); - break; + ($hostent['domain'] == $_POST['domain'])) { + if (is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) { + $input_errors[] = gettext("This host/domain override combination already exists with an IPv4 address."); + break; + } + if (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])) { + $input_errors[] = gettext("This host/domain override combination already exists with an IPv6 address."); + break; + } } } @@ -262,7 +266,7 @@ if (isset($id) && $a_hosts[$id]) { 'id', null, 'hidden', - $pconfig['id'] + $id )); } diff --git a/src/usr/local/www/services_unbound_host_edit.php b/src/usr/local/www/services_unbound_host_edit.php index 392f8bd..9a69288 100644 --- a/src/usr/local/www/services_unbound_host_edit.php +++ b/src/usr/local/www/services_unbound_host_edit.php @@ -180,10 +180,15 @@ if ($_POST) { } if (($hostent['host'] == $_POST['host']) && - ($hostent['domain'] == $_POST['domain']) && - ((is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) || (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])))) { - $input_errors[] = gettext("This host/domain already exists."); - break; + ($hostent['domain'] == $_POST['domain'])) { + if (is_ipaddrv4($hostent['ip']) && is_ipaddrv4($_POST['ip'])) { + $input_errors[] = gettext("This host/domain override combination already exists with an IPv4 address."); + break; + } + if (is_ipaddrv6($hostent['ip']) && is_ipaddrv6($_POST['ip'])) { + $input_errors[] = gettext("This host/domain override combination already exists with an IPv6 address."); + break; + } } } @@ -277,7 +282,7 @@ if (isset($id) && $a_hosts[$id]) { 'id', null, 'hidden', - $pconfig['id'] + $id )); } |