diff options
author | Lauris BH <lauris@nix.lv> | 2017-04-19 06:02:20 +0300 |
---|---|---|
committer | Bo-Yi Wu <appleboy.tw@gmail.com> | 2017-04-19 11:02:20 +0800 |
commit | f42ec6120e8a2830407027020b65391ebf8e7f59 (patch) | |
tree | aee67e8f44d105ef957b27fe3777e38aa034baa6 /modules/auth/org.go | |
parent | 941281ae12f0df84ffc73c279dc9e55f058e4703 (diff) | |
download | gitea-f42ec6120e8a2830407027020b65391ebf8e7f59.tar.gz gitea-f42ec6120e8a2830407027020b65391ebf8e7f59.zip |
Better URL validation (#1507)
* Add correct git branch name validation
* Change git refname validation error constant name
* Implement URL validation based on GoLang url.Parse method
* Backward compatibility with older Go compiler
* Add git reference name validation unit tests
* Remove unused variable in unit test
* Implement URL validation based on GoLang url.Parse method
* Backward compatibility with older Go compiler
* Add url validation unit tests
Diffstat (limited to 'modules/auth/org.go')
-rw-r--r-- | modules/auth/org.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/auth/org.go b/modules/auth/org.go index 8ad2ca6c6a..b9b3f981e1 100644 --- a/modules/auth/org.go +++ b/modules/auth/org.go @@ -31,7 +31,7 @@ type UpdateOrgSettingForm struct { Name string `binding:"Required;AlphaDashDot;MaxSize(35)" locale:"org.org_name_holder"` FullName string `binding:"MaxSize(100)"` Description string `binding:"MaxSize(255)"` - Website string `binding:"Url;MaxSize(255)"` + Website string `binding:"ValidUrl;MaxSize(255)"` Location string `binding:"MaxSize(50)"` MaxRepoCreation int } |