X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=users.sh;h=f60f8a645ff7ae4445737bbf92d58dad8ec913c1;hb=e7fcaf2f6bd62868cce4dab41056ee2597c47d58;hp=d738ee94ec70a9ac6a55a5cc2321b0628063be4a;hpb=3055b170b4be8a5a0939a0394ef470b90208e7ff;p=cgilite diff --git a/users.sh b/users.sh index d738ee9..f60f8a6 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 @@ -17,8 +17,8 @@ [ -n "$include_users" ] && return 0 include_users="$0" -. "${_EXEC}/cgilite/session.sh" -. "${_EXEC}/cgilite/storage.sh" +. "${_EXEC:-.}/cgilite/session.sh" +. "${_EXEC:-.}/cgilite/storage.sh" SENDMAIL=${SENDMAIL-sendmail} @@ -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" @@ -638,7 +638,7 @@ w_user_invite(){ w_user_login_logon(){ # TRANSLATION cat <<-EOF [form #user_login .login method=POST - [input name=uname placeholder="Username or Email" autocomplete=off] + [input name=uname placeholder="Username or Email"] [input type=password name=pw placeholder="Passphrase"] [submit "action" "user_login" Login] ]