diff --git a/files/www/cgi-bin/vpn b/files/www/cgi-bin/vpn index 57ff5d6d..bc8110e7 100755 --- a/files/www/cgi-bin/vpn +++ b/files/www/cgi-bin/vpn @@ -258,7 +258,7 @@ do err(val .. " this client must be added or cleared out before saving changes") break end - if passwd:match("%W") then + if passwd:match("[^%w@]") then err("The password cannot contain non-alphanumeric characters (#" .. client_num .. ")") end if not passwd:match("%a") then diff --git a/files/www/cgi-bin/vpnc b/files/www/cgi-bin/vpnc index 444ace83..4e9a24c1 100755 --- a/files/www/cgi-bin/vpnc +++ b/files/www/cgi-bin/vpnc @@ -256,7 +256,7 @@ do err(val .. " this connection must be added or cleared out before saving changes") break end - if passwd:match("%W") then + if passwd:match("[^%w@]") then err("The password cannot contain non-alphanumeric characters (#" .. conn_num .. ")") end if host == "" then