X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=users.sh;h=18fde077d6a99ec191d8aa016c34addd19c65fc7;hb=51f6906bca7e34cdedca01e024f6cedb1c9e3ecd;hp=f616ca02baca5d07c7199640ab436e064f4d405a;hpb=bfef1a064081f6f31ef90539e72dda84e6b563c8;p=cgilite diff --git a/users.sh b/users.sh index f616ca0..18fde07 100755 --- a/users.sh +++ b/users.sh @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright 2021 - 2023 Paul Hänsch +# Copyright 2021 - 2024 Paul Hänsch # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above @@ -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"