修改密码最短要求为6,最长要求为32

This commit is contained in:
Gitea
2023-10-25 10:09:01 +08:00
parent c2b1a141c2
commit b05a7d3b76
245 changed files with 8780 additions and 8322 deletions

View File

@@ -54,7 +54,7 @@ class Api::V1::UsersController < Api::V1::BaseController
def check_password
password = params[:password]
return tip_exception(-5, "8~16位密码,支持字母数字和符号") unless password =~ CustomRegexp::PASSWORD
return tip_exception(-5, "6~32位密码,支持字母数字和符号") unless password =~ CustomRegexp::PASSWORD
return tip_exception(-5, "密码错误") unless @observe_user.check_password?(password)
render_ok
end