From 837f0fe6ce10cb16e3e09a17b22678ecc48ca65b Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Mon, 29 Jul 2024 22:49:50 +0330 Subject: [PATCH] Update regex pattern --- core/scripts/hysteria2/edit_user.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/scripts/hysteria2/edit_user.sh b/core/scripts/hysteria2/edit_user.sh index 3fc4c4d..66459be 100644 --- a/core/scripts/hysteria2/edit_user.sh +++ b/core/scripts/hysteria2/edit_user.sh @@ -14,8 +14,8 @@ validate_inputs() { # Validate username if [ -n "$new_username" ]; then - if ! [[ "$new_username" =~ ^[a-z0-9]+$ ]]; then - echo -e "${red}Error:${NC} Username can only contain lowercase letters and numbers." + if ! [[ "$new_username" =~ ^[a-zA-Z0-9]+$ ]]; then + echo -e "${red}Error:${NC} Username can only contain letters and numbers." exit 1 fi fi