From d4d747de051b7926a0b645650b16e363dda5aafd Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Mon, 20 Jan 2025 19:25:02 -0700 Subject: [PATCH] create: Do not allow only numbers in name --- usr/local/share/bastille/create.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/usr/local/share/bastille/create.sh b/usr/local/share/bastille/create.sh index 0f47f17c..9160835f 100644 --- a/usr/local/share/bastille/create.sh +++ b/usr/local/share/bastille/create.sh @@ -68,6 +68,8 @@ validate_name() { error_exit "Container names may not begin with (-|_) characters!" elif [ "${NAME_VERIFY}" != "${NAME_SANITY}" ]; then error_exit "Container names may not contain special characters!" + elif echo "${NAME_VERIFY}" | grep -qE '^[0-9]+$'; then + error_exit "Container names may not contain only numbers." fi }