diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-10-14 10:50:49 -0500 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-10-14 10:50:49 -0500 |
commit | 123d87006016d149d45f0a23be5cdc2c550953d9 (patch) | |
tree | 1ca7029d3d533cc0536026554a2895abc19ad33a /usr/local/www/vpn_ipsec_keys_edit.php | |
parent | a4c1fff29405ef355db2b5f97b411675a04f1fc2 (diff) | |
download | pfsense-123d87006016d149d45f0a23be5cdc2c550953d9.zip pfsense-123d87006016d149d45f0a23be5cdc2c550953d9.tar.gz |
Does not accept non-ascii characters on IPsec PSK. It fiixes #3931
Diffstat (limited to 'usr/local/www/vpn_ipsec_keys_edit.php')
-rw-r--r-- | usr/local/www/vpn_ipsec_keys_edit.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/vpn_ipsec_keys_edit.php b/usr/local/www/vpn_ipsec_keys_edit.php index b1c24aa..c445a6e 100644 --- a/usr/local/www/vpn_ipsec_keys_edit.php +++ b/usr/local/www/vpn_ipsec_keys_edit.php @@ -78,6 +78,9 @@ if ($_POST) { $input_errors[] = gettext("A user with this name already exists. Add the key to the user instead."); unset($userids); + if (isset($_POST['psk']) && !preg_match('/^[[:ascii:]]*$/', $_POST['psk'])) + $input_errors[] = gettext("Pre-Shared Key contains invalid characters."); + if (!$input_errors && !(isset($id) && $a_secret[$id])) { /* make sure there are no dupes */ foreach ($a_secret as $secretent) { |