From a85d3752ef94ed1aaad70ba6d483f93583152eca Mon Sep 17 00:00:00 2001 From: Orazio <22700499+orazioedoardo@users.noreply.github.com> Date: Wed, 13 Dec 2023 18:09:55 +0100 Subject: [PATCH] fix(scripts): disallow using server's name as client name (#1791) --- scripts/wireguard/makeCONF.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/wireguard/makeCONF.sh b/scripts/wireguard/makeCONF.sh index 480a8f8..67fd527 100755 --- a/scripts/wireguard/makeCONF.sh +++ b/scripts/wireguard/makeCONF.sh @@ -49,6 +49,9 @@ checkName() { elif [[ -z "${CLIENT_NAME}" ]]; then err "::: You cannot leave the name blank." exit 1 + elif [[ "${CLIENT_NAME}" == "server" ]]; then + err "Sorry, this is in use by the server and cannot be used by clients." + exit 1 elif [[ -f "configs/${CLIENT_NAME}.conf" ]]; then err "::: A client with this name already exists" exit 1