summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-14 22:51:51 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-14 22:51:51 +0000
commitea206efb69d1f64bf5ea0754108d551b8ff551a4 (patch)
tree610bcf51536bc3f1754773b3266442221de757fc /usr
parente4065f5b59fab45f0d6aa230bd7f0c8d1deb96a8 (diff)
downloadpfsense-ea206efb69d1f64bf5ea0754108d551b8ff551a4.zip
pfsense-ea206efb69d1f64bf5ea0754108d551b8ff551a4.tar.gz
Correctly deterimine key size
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces_wlan.inc12
1 files changed, 9 insertions, 3 deletions
diff --git a/usr/local/www/interfaces_wlan.inc b/usr/local/www/interfaces_wlan.inc
index 08dee1a..224e319 100755
--- a/usr/local/www/interfaces_wlan.inc
+++ b/usr/local/www/interfaces_wlan.inc
@@ -76,9 +76,15 @@ function wireless_config_post() {
/* loop through keys and enforce size */
for ($i = 1; $i <= 4; $i++) {
if ($_POST['key' . $i]) {
- if(strlen($_POST['key' . $i]) <> 40 and strlen($_POST['key' . $i]) <> 104) {
- $input_errors[] = "Invalid wep key size. Sizes should be 40 (64) bit keys or 104 (128) bit.";
- }
+ if(strlen($_POST['key' . $i]) == 5)
+ continue;
+ if(strlen($_POST['key' . $i]) == 10)
+ continue;
+ if(strlen($_POST['key' . $i]) == 13)
+ continue;
+ if(strlen($_POST['key' . $i]) == 26)
+ continue;
+ $input_errors[] = "Invalid wep key size. Sizes should be 40 (64) bit keys or 104 (128) bit.";
}
}
OpenPOWER on IntegriCloud