summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-01-15 13:13:10 +0000
committerErmal Luçi <eri@pfsense.org>2010-01-15 13:13:10 +0000
commit08fae4381bffb6ca3e786e42baffb685aa8d8241 (patch)
treec54d791a0c3c8d8d1994114be8be79d0a8204aee
parentedc8a9f8d6e9f69d33bc5e5776f188d6394f8d66 (diff)
downloadpfsense-08fae4381bffb6ca3e786e42baffb685aa8d8241.zip
pfsense-08fae4381bffb6ca3e786e42baffb685aa8d8241.tar.gz
Ticket #297. Verify WPA PSK key length.
-rwxr-xr-xusr/local/www/interfaces.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 7564849..933635c 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -439,6 +439,12 @@ if ($_POST) {
break;
}
}
+
+ if ($_POST['passphrase']) {
+ $passlen = strlen($_POST['passphrase']);
+ if ($passlen < 8 || $passlen > 64)
+ $input_errors[] = "The length of the passphrase should be between 8 and 63 characters.";
+ }
}
if (!$input_errors) {
unset($wancfg['ipaddr']);
OpenPOWER on IntegriCloud