From ad68e298dd144c193689497ad66baed69b573d49 Mon Sep 17 00:00:00 2001 From: William Hirigoyen Date: Fri, 9 Dec 2022 15:30:11 +0100 Subject: [PATCH] =?UTF-8?q?V=C3=A9rCheck=20chars=20[:/]=20are=20not=20in?= =?UTF-8?q?=20the=20domain=20name=20(in=20case=20of=20confusion=20with=20U?= =?UTF-8?q?RL)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/web-add.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/web-add.sh b/scripts/web-add.sh index 832dacc..443fecc 100755 --- a/scripts/web-add.sh +++ b/scripts/web-add.sh @@ -236,6 +236,15 @@ validate_wwwdomain() { in_error "Le nom de domaine est obligatoire" return 1 fi + case "$wwwdomain" in + *'/'*) + in_error "Le caractère / n'est pas autorisé. Avez-vous confondu nom de domaine (example.com) et URL (https://example.com) ?" + return 1;; + *':'*) + in_error "Le caractère : n'est pas autorisé. Avez-vous confondu nom de domaine (example.com) et URL (https://example.com) ?" + return 1;; + esac + return 0 }