From 68520aa7b2d8e436f0ec5c07cedf7d8a4fe060cb Mon Sep 17 00:00:00 2001 From: Orazio <22700499+orazioedoardo@users.noreply.github.com> Date: Sat, 13 Apr 2024 15:54:01 +0200 Subject: [PATCH] fix(scripts): prevent adding wireguard 'usernames' longer than 15 characters, fixes issue #1816 --- scripts/wireguard/makeCONF.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/wireguard/makeCONF.sh b/scripts/wireguard/makeCONF.sh index 23d04ef..17a4e97 100755 --- a/scripts/wireguard/makeCONF.sh +++ b/scripts/wireguard/makeCONF.sh @@ -52,6 +52,9 @@ checkName() { elif [[ "${CLIENT_NAME::1}" == "." ]]; then err "Names cannot start with a . (dot)." exit 1 + elif [[ "${#CLIENT_NAME}" -gt 15 ]]; then + err "::: Names cannot be longer than 15 characters." + exit 1 elif [[ -z "${CLIENT_NAME}" ]]; then err "::: You cannot leave the name blank." exit 1