From 69c0d51216f7154fbbe1245015aa83da77eec475 Mon Sep 17 00:00:00 2001 From: Tim Wilkinson Date: Sun, 20 Mar 2022 15:46:56 -0700 Subject: [PATCH] Add @ back in as a valid password character (#312) --- files/www/cgi-bin/vpn | 2 +- files/www/cgi-bin/vpnc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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