summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2017-03-28 15:43:09 +0545
committerjim-p <jimp@pfsense.org>2017-03-28 09:11:02 -0400
commit7abb61ef1468840f4a2a3c10adb21b51ae06ee4a (patch)
tree4dc5d8a282cdda2c5dec5d2d04a3c746dea3d6bd
parentd401a7001f47f63ae4b0ee4c48375ee48ceb69f8 (diff)
downloadpfsense-7abb61ef1468840f4a2a3c10adb21b51ae06ee4a.zip
pfsense-7abb61ef1468840f4a2a3c10adb21b51ae06ee4a.tar.gz
Redmine #7435 Fix edit problems due to POST id code
-rw-r--r--src/usr/local/www/services_captiveportal_vouchers_edit.php2
-rw-r--r--src/usr/local/www/services_dnsmasq_domainoverride_edit.php2
-rw-r--r--src/usr/local/www/services_dnsmasq_edit.php16
-rw-r--r--src/usr/local/www/services_unbound_host_edit.php15
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 9572935..790c1ed 100644
--- a/src/usr/local/www/services_captiveportal_vouchers_edit.php
+++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php
@@ -251,7 +251,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 077bd94..ac5a706 100644
--- a/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
+++ b/src/usr/local/www/services_dnsmasq_domainoverride_edit.php
@@ -197,7 +197,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 90dd343..2936dd9 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;
+ }
}
}
@@ -261,7 +265,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 3124343..da4559d 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;
+ }
}
}
@@ -276,7 +281,7 @@ if (isset($id) && $a_hosts[$id]) {
'id',
null,
'hidden',
- $pconfig['id']
+ $id
));
}
OpenPOWER on IntegriCloud