From 04871f749f90aeaa8bfca07edf5a6cd5d3fac2bf Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 16 Feb 2024 18:39:18 +0100 Subject: [PATCH] bugfix: faulty validation in user_update made pw change impossible --- users.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/users.sh b/users.sh index f616ca0..4d7965a 100755 --- a/users.sh +++ b/users.sh @@ -429,7 +429,7 @@ user_update(){ uid="$(POST uid)" oldpw="$(POST oldpw)" - pw="$(POST pw |grep -xE '.{6}')" + pw="$(POST pw |grep -m1 -xE '.{6,}')" pwconfirm="$(POST pwconfirm)" @@ -442,7 +442,7 @@ user_update(){ update_user "${uid}" password="$pw" REDIRECT "${_BASE}${PATH_INFO}#UPDATE_SUCCESS" else - REDIRECT "${_BASE}${PATH_INFO}#ERROR_PWMISMATCH" + REDIRECT "${_BASE}${PATH_INFO}#ERROR_PW_MISMATCH" fi elif [ "$UID_" = "$USER_ID" ]; then REDIRECT "${_BASE}${PATH_INFO}#ERROR_INVALID_AUTH_PASSWORD" -- 2.39.2