diff options
author | jim-p <jim@pingle.org> | 2010-04-19 16:27:00 -0400 |
---|---|---|
committer | jim-p <jim@pingle.org> | 2010-04-19 16:27:00 -0400 |
commit | 6e6a5ce36fee7ac4d822078157da6af8ee3bfeb3 (patch) | |
tree | 9a8783be44a04ae4e2a9146b22d71e581178224f /usr/local/www/wizards/openvpn_wizard.inc | |
parent | 494b4e60267738961ffacf5162cc39ed025543f7 (diff) | |
download | pfsense-6e6a5ce36fee7ac4d822078157da6af8ee3bfeb3.zip pfsense-6e6a5ce36fee7ac4d822078157da6af8ee3bfeb3.tar.gz |
Restrict country code entry in the OpenVPN wizard to two letters.
Diffstat (limited to 'usr/local/www/wizards/openvpn_wizard.inc')
-rw-r--r-- | usr/local/www/wizards/openvpn_wizard.inc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/wizards/openvpn_wizard.inc b/usr/local/www/wizards/openvpn_wizard.inc index 361e823..dc6e91e 100644 --- a/usr/local/www/wizards/openvpn_wizard.inc +++ b/usr/local/www/wizards/openvpn_wizard.inc @@ -188,6 +188,9 @@ function step7_submitphpaction() { } elseif (in_array($_POST['name'], $canames) || in_array($_POST['name'], $cacns)) { $stepid--; $savemsg = "Please enter a different name for the Certicicate Authority. A Certificate Authority with that name already exists."; + } elseif (strlen($_POST['country']) != 2) { + $stepid--; + $savemsg = "Please enter only a two-letter ISO country code"; } else { $config['ovpnserver']['step6']['uselist'] = "on"; $_POST['uselist'] = "on"; @@ -269,6 +272,9 @@ function step9_submitphpaction() { } elseif (in_array($_POST['name'], $certnames) || in_array($_POST['name'], $certcns)) { $stepid--; $savemsg = "Please enter a different name for the Certicicate. A Certificate with that name/common name already exists."; + } elseif (strlen($_POST['country']) != 2) { + $stepid--; + $savemsg = "Please enter only a two-letter ISO country code"; } else { $config['ovpnserver']['step9']['uselist'] = "on"; $_POST['uselist'] = "on"; |