diff options
author | Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> | 2015-06-03 15:46:37 +0200 |
---|---|---|
committer | Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> | 2015-06-03 15:46:37 +0200 |
commit | b36134194cf8304ba553c2623447ea60586cd5e2 (patch) | |
tree | 34acd10fa965d4d28496fc34df0066faad3e302e /modules/auth | |
parent | 06476459482cfdcb52cbee65d204d92d0ba3844d (diff) | |
download | gitea-b36134194cf8304ba553c2623447ea60586cd5e2.tar.gz gitea-b36134194cf8304ba553c2623447ea60586cd5e2.zip |
settings/password: no minimal required characters for OldPassword
If users are added to gogs due a reverse proxy automatically, their password is
set to their initial username. If their username is shorter than 6 characters,
they can never set a password. But since this password is required for some
operations (e.g. repository deletion), they could not use all features of gogs
until now.
Diffstat (limited to 'modules/auth')
-rw-r--r-- | modules/auth/user_form.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/auth/user_form.go b/modules/auth/user_form.go index b616a460ff..d3d7306774 100644 --- a/modules/auth/user_form.go +++ b/modules/auth/user_form.go @@ -107,7 +107,7 @@ func (f *AddEmailForm) Validate(ctx *macaron.Context, errs binding.Errors) bindi } type ChangePasswordForm struct { - OldPassword string `form:"old_password" binding:"Required;MinSize(6);MaxSize(255)"` + OldPassword string `form:"old_password" binding:"Required;MinSize(1);MaxSize(255)"` Password string `form:"password" binding:"Required;MinSize(6);MaxSize(255)"` Retype string `form:"retype"` } |