Skip to content

Commit 71fd10d

Browse files
committed
change minimum password length to 1
1 parent b169666 commit 71fd10d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎modules/auth/user_form.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ type InstallForm struct {
3939
RequireSignInView bool
4040

4141
AdminName string `binding:"OmitEmpty;AlphaDashDot;MaxSize(30)" locale:"install.admin_name"`
42-
AdminPasswd string `binding:"OmitEmpty;MinSize(6);MaxSize(255)" locale:"install.admin_password"`
42+
AdminPasswd string `binding:"OmitEmpty;MaxSize(255)" locale:"install.admin_password"`
4343
AdminConfirmPasswd string
4444
AdminEmail string `binding:"OmitEmpty;Email;MaxSize(50)" locale:"install.admin_email"`
4545
}
@@ -58,7 +58,7 @@ func (f *InstallForm) Validate(ctx *macaron.Context, errs binding.Errors) bindin
5858
type RegisterForm struct {
5959
UserName string `form:"uname" binding:"Required;AlphaDashDot;MaxSize(35)"`
6060
Email string `form:"email" binding:"Required;Email;MaxSize(50)"`
61-
Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
61+
Password string `form:"password" binding:"Required;MaxSize(255)"`
6262
Retype string `form:"retype"`
6363
LoginType string `form:"logintype"`
6464
LoginName string `form:"loginname"`
@@ -70,7 +70,7 @@ func (f *RegisterForm) Validate(ctx *macaron.Context, errs binding.Errors) bindi
7070

7171
type SignInForm struct {
7272
UserName string `form:"uname" binding:"Required;MaxSize(35)"`
73-
Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
73+
Password string `form:"password" binding:"Required;MaxSize(255)"`
7474
Remember bool `form:"remember"`
7575
}
7676

@@ -117,7 +117,7 @@ func (f *AddEmailForm) Validate(ctx *macaron.Context, errs binding.Errors) bindi
117117

118118
type ChangePasswordForm struct {
119119
OldPassword string `form:"old_password" binding:"Required;MinSize(1);MaxSize(255)"`
120-
Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"`
120+
Password string `form:"password" binding:"Required;MaxSize(255)"`
121121
Retype string `form:"retype"`
122122
}
123123

0 commit comments

Comments
 (0)