summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/firewall_virtual_ip_edit.php
diff options
context:
space:
mode:
authorStephen Beaver <sbeaver@netgate.com>2015-12-28 16:11:17 -0500
committerStephen Beaver <sbeaver@netgate.com>2015-12-28 16:11:17 -0500
commitc8b10b4ce59161e21a93786d04237ad3f330178a (patch)
tree9e696532f61abc22b52ebb86d678ec7c1ac356c4 /src/usr/local/www/firewall_virtual_ip_edit.php
parent690026d8256f15fd3b1df97ca1cba8f4815e425e (diff)
downloadpfsense-c8b10b4ce59161e21a93786d04237ad3f330178a.zip
pfsense-c8b10b4ce59161e21a93786d04237ad3f330178a.tar.gz
Added new addPassword method and password == password_confirm validation where required.
Diffstat (limited to 'src/usr/local/www/firewall_virtual_ip_edit.php')
-rw-r--r--src/usr/local/www/firewall_virtual_ip_edit.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php
index 0e379bc..16d26ef 100644
--- a/src/usr/local/www/firewall_virtual_ip_edit.php
+++ b/src/usr/local/www/firewall_virtual_ip_edit.php
@@ -209,6 +209,10 @@ if ($_POST) {
$input_errors[] = gettext("You must specify a CARP password that is shared between the two VHID members.");
}
+ if ($_POST['password'] != $_POST['password_confirm']) {
+ $input_errors[] = gettext("Password and confirm password must match");
+ }
+
if ($_POST['interface'] == 'lo0') {
$input_errors[] = gettext("For this type of vip localhost is not allowed.");
} else if (strpos($_POST['interface'], '_vip')) {
@@ -419,7 +423,7 @@ $section->addInput(new Form_Checkbox(
isset($pconfig['noexpand'])
));
-$section->addInput(new Form_Input(
+$section->addPassword(new Form_Input(
'password',
'Virtual IP Password',
'password',
@@ -513,6 +517,7 @@ events.push(function() {
disableInput('subnet_bits', true);
disableInput('type', true);
disableInput('password', true);
+ disableInput('password_confirm', true);
hideCheckbox('noexpand', true);
if (mode == 'ipalias') {
@@ -526,6 +531,7 @@ events.push(function() {
disableInput('advbase', false);
disableInput('advskew', false);
disableInput('password', false);
+ disableInput('password_confirm', false);
disableInput('subnet_bits', false);
$('#type').val('single');
} else if (mode == 'proxyarp') {
OpenPOWER on IntegriCloud