aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/setting/account.go
diff options
context:
space:
mode:
authorguillep2k <18600385+guillep2k@users.noreply.github.com>2019-11-19 19:44:58 -0300
committerzeripath <art27@cantab.net>2019-11-19 22:44:58 +0000
commitc57edb6c7b5066da2b0f526e6ab9f7842fd785fb (patch)
tree68d44a4dbc58f8ade1373eb30fe850410511ce43 /routers/user/setting/account.go
parenteb0359cad4b725553c8bca3e95ada9c789c5da0b (diff)
downloadgitea-c57edb6c7b5066da2b0f526e6ab9f7842fd785fb.tar.gz
gitea-c57edb6c7b5066da2b0f526e6ab9f7842fd785fb.zip
Add password requirement info on error (#9074)
* Add password requirement info on error * Move BuildComplexityError to the password pkg * Unexport complexity type * Fix extra line * Update modules/password/password.go Co-Authored-By: Lauris BH <lauris@nix.lv>
Diffstat (limited to 'routers/user/setting/account.go')
-rw-r--r--routers/user/setting/account.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting/account.go b/routers/user/setting/account.go
index 73799c8bd7..a9064b0e15 100644
--- a/routers/user/setting/account.go
+++ b/routers/user/setting/account.go
@@ -53,7 +53,7 @@ func AccountPost(ctx *context.Context, form auth.ChangePasswordForm) {
} else if form.Password != form.Retype {
ctx.Flash.Error(ctx.Tr("form.password_not_match"))
} else if !password.IsComplexEnough(form.Password) {
- ctx.Flash.Error(ctx.Tr("form.password_complexity"))
+ ctx.Flash.Error(password.BuildComplexityError(ctx))
} else {
var err error
if ctx.User.Salt, err = models.GetUserSalt(); err != nil {