Browse Source

Merge pull request '安全注册接口优化:增加密码最小长度限制' (#220) from fix-179 into V20210731.patch

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/220
pull/221/head
avadesian 3 years ago
parent
commit
cb479e8418
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      routers/secure/user.go

+ 1
- 1
routers/secure/user.go View File

@@ -88,7 +88,7 @@ func CreateUser(ctx *context.Context, form api.CreateUserOption) {
if ctx.Written() {
return
}
if !password.IsComplexEnough(form.Password) {
if !password.IsComplexEnough(form.Password) || len(form.Password) < setting.MinPasswordLength {
log.Error("CreateUser failed: PasswordComplexity", ctx.Data["MsgID"])
ctx.JSON(http.StatusBadRequest, map[string]string{
"error_msg": "PasswordComplexity",


Loading…
Cancel
Save