#!/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
uid="$(POST uid)"
oldpw="$(POST oldpw)"
- pw="$(POST pw |grep -xE '.{6}')"
+ pw="$(POST pw |grep -m1 -xE '.{6,}')"
pwconfirm="$(POST pwconfirm)"
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"
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]
]