|
|
@@ -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", |
|
|
|