diff --git a/scripts/openvpn/makeOVPN.sh b/scripts/openvpn/makeOVPN.sh index 5300a2b..b03af64 100755 --- a/scripts/openvpn/makeOVPN.sh +++ b/scripts/openvpn/makeOVPN.sh @@ -248,6 +248,11 @@ if [[ "${NAME}" =~ [^a-zA-Z0-9.@_-] ]]; then exit 1 fi +if [[ "${NAME}" =~ ^[0-9]+$ ]]; then + echo "Names cannot be integers." + exit 1 +fi + if [[ -z "${NAME}" ]]; then echo "You cannot leave the name blank." exit 1 diff --git a/scripts/wireguard/makeCONF.sh b/scripts/wireguard/makeCONF.sh index e919e4a..e0669b8 100755 --- a/scripts/wireguard/makeCONF.sh +++ b/scripts/wireguard/makeCONF.sh @@ -64,6 +64,11 @@ if [[ "${CLIENT_NAME}" =~ [^a-zA-Z0-9.@_-] ]]; then exit 1 fi +if [[ "${CLIENT_NAME}" =~ ^[0-9]+$ ]]; then + echo "Names cannot be integers." + exit 1 +fi + if [ -z "${CLIENT_NAME}" ]; then echo "::: You cannot leave the name blank." exit 1