diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-05-25 18:00:54 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-05-25 18:02:05 -0400 |
commit | 474f36d1b277b3e0732496bf0ca8aa1659710809 (patch) | |
tree | 0d5b1a7936751d4a7f1979263d6dbf334821f702 /usr/local/www/services_captiveportal_vouchers.php | |
parent | 5c723d9fccffe78e1650c574427100760d0faf5e (diff) | |
download | pfsense-474f36d1b277b3e0732496bf0ca8aa1659710809.zip pfsense-474f36d1b277b3e0732496bf0ca8aa1659710809.tar.gz |
* Add is_ipaddr_configured() so that people do not need to reinvent the wheel for this task
* Check to make sure the administrator is not entering the IP address of the same host preventing a issue where the firewall will sync the voucher database to itself and cause the webConfigurator to crash.
Diffstat (limited to 'usr/local/www/services_captiveportal_vouchers.php')
-rw-r--r-- | usr/local/www/services_captiveportal_vouchers.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php index e1c54b1..bdef534 100644 --- a/usr/local/www/services_captiveportal_vouchers.php +++ b/usr/local/www/services_captiveportal_vouchers.php @@ -206,6 +206,8 @@ if ($_POST) { $input_errors[] = gettext("This doesn't look like an RSA Public key."); if ($_POST['privatekey'] && (!strstr($_POST['privatekey'],"BEGIN RSA PRIVATE KEY"))) $input_errors[] = gettext("This doesn't look like an RSA Private key."); + if ($_POST['vouchersyncdbip'] && (is_ipaddr_configured($_POST['vouchersyncdbip']))) + $input_errors[] = gettext("You cannot sync the voucher database to this host (itself)."); } if (!$input_errors) { |