From 23cc58ce3abe7b1808baf6425f96f81dfc4e2a5d Mon Sep 17 00:00:00 2001 From: johanfagerstroem Date: Tue, 1 May 2018 16:38:38 +0200 Subject: [PATCH] Changing name validation regex to allow dashes Great for readable naming conventions. --- scripts/makeOVPN.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/makeOVPN.sh b/scripts/makeOVPN.sh index 09ef655..ed29501 100755 --- a/scripts/makeOVPN.sh +++ b/scripts/makeOVPN.sh @@ -141,8 +141,8 @@ if [ -z "${NAME}" ]; then read -r NAME fi -if [[ "${NAME}" =~ [^a-zA-Z0-9] ]]; then - echo "Name can only contain alphanumeric characters." +if [[ "${NAME}" =~ [^a-zA-Z0-9\-] ]]; then + echo "Name can only contain alphanumeric characters and dashes (-)." exit 1 fi