diff options
author | Unknwon <u@gogs.io> | 2017-03-07 14:07:20 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2017-03-07 14:07:20 -0500 |
commit | e6dbfd918c8d68c29c01bf2617321b037393ada1 (patch) | |
tree | 682c0cee223659782ba6e44cef65b1cfce67f5dc /modules/form/user.go | |
parent | c2f0711db04af5418b1348f7a166e667fd995003 (diff) |
security: fix vulnerability in changing username
Reported by João Arnaut.
Diffstat (limited to 'modules/form/user.go')
-rw-r--r-- | modules/form/user.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/form/user.go b/modules/form/user.go index c7d7a3d6..a7a34925 100644 --- a/modules/form/user.go +++ b/modules/form/user.go @@ -90,7 +90,7 @@ func (f *SignIn) Validate(ctx *macaron.Context, errs binding.Errors) binding.Err // \/ \/ \/ \/ \/ type UpdateProfile struct { - Name string `binding:"OmitEmpty;MaxSize(35)"` + Name string `binding:"Required;AlphaDashDot;MaxSize(35)"` FullName string `binding:"MaxSize(100)"` Email string `binding:"Required;Email;MaxSize(254)"` Website string `binding:"Url;MaxSize(100)"` |