Ticket #297. Verify WPA PSK key length.

This commit is contained in:
Ermal Lui 2010-01-15 13:13:10 +00:00
parent edc8a9f8d6
commit 08fae4381b

View File

@ -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']);