diff options
Diffstat (limited to 'routers/user/auth.go')
-rw-r--r-- | routers/user/auth.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/user/auth.go b/routers/user/auth.go index 82a508e4dc..b328ac094e 100644 --- a/routers/user/auth.go +++ b/routers/user/auth.go @@ -1070,6 +1070,11 @@ func SignUpPost(ctx *context.Context, cpt *captcha.Captcha, form auth.RegisterFo ctx.RenderWithErr(ctx.Tr("auth.password_too_short", setting.MinPasswordLength), tplSignUp, &form) return } + if !password.IsComplexEnough(form.Password) { + ctx.Data["Err_Password"] = true + ctx.RenderWithErr(ctx.Tr("form.password_complexity"), tplSignUp, &form) + return + } u := &models.User{ Name: form.UserName, |