diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-01-15 13:13:10 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-01-15 13:13:10 +0000 |
commit | 08fae4381bffb6ca3e786e42baffb685aa8d8241 (patch) | |
tree | c54d791a0c3c8d8d1994114be8be79d0a8204aee | |
parent | edc8a9f8d6e9f69d33bc5e5776f188d6394f8d66 (diff) | |
download | pfsense-08fae4381bffb6ca3e786e42baffb685aa8d8241.zip pfsense-08fae4381bffb6ca3e786e42baffb685aa8d8241.tar.gz |
Ticket #297. Verify WPA PSK key length.
-rwxr-xr-x | usr/local/www/interfaces.php | 6 |
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']); |