diff options
author | Otto Richter (fnetX) <git@fralix.ovh> | 2023-01-28 08:59:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-28 15:59:46 +0800 |
commit | 95d9fbdcf39db7595a23a69ca48bfb49b845874a (patch) | |
tree | a5703f01c2aaf0f3b914b7d5320d538e33084c5c /templates | |
parent | 74466eb1334386148caa50ccfd18b0f218e413d7 (diff) | |
download | gitea-95d9fbdcf39db7595a23a69ca48bfb49b845874a.tar.gz gitea-95d9fbdcf39db7595a23a69ca48bfb49b845874a.zip |
Fix error on account activation with wrong passwd (#22609)
On activating local accounts, the error message didn't differentiate
between using a wrong or expired token, or a wrong password. The result
could already be obtained from the behaviour (different screens were
presented), but the error message was misleading and lead to confusion
for new users on Codeberg with Forgejo.
Now, entering a wrong password for a valid token prints a different
error message.
The problem was introduced in 0f14f69e6070c9aca09f57c419e7d6007d0e520b.
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/auth/activate.tmpl | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl index eba9e3229b..ef72ef1e54 100644 --- a/templates/user/auth/activate.tmpl +++ b/templates/user/auth/activate.tmpl @@ -30,8 +30,10 @@ <input id="code" name="code" type="hidden" value="{{.Code}}"> {{else if .IsSendRegisterMail}} <p>{{.locale.Tr "auth.confirmation_mail_sent_prompt" (.Email|Escape) .ActiveCodeLives | Str2html}}</p> - {{else if .IsActivateFailed}} + {{else if .IsCodeInvalid}} <p>{{.locale.Tr "auth.invalid_code"}}</p> + {{else if .IsPasswordInvalid}} + <p>{{.locale.Tr "auth.invalid_password"}}</p> {{else if .ManualActivationOnly}} <p class="center">{{.locale.Tr "auth.manual_activation_only"}}</p> {{else}} |