summaryrefslogtreecommitdiffstats
path: root/options
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-04-19 06:02:20 +0300
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-04-19 11:02:20 +0800
commitf42ec6120e8a2830407027020b65391ebf8e7f59 (patch)
treeaee67e8f44d105ef957b27fe3777e38aa034baa6 /options
parent941281ae12f0df84ffc73c279dc9e55f058e4703 (diff)
downloadgitea-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 'options')
-rw-r--r--options/locale/locale_en-US.ini1
1 files changed, 1 insertions, 0 deletions
diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini
index cb39ec8571..04b5f44d2c 100644
--- a/options/locale/locale_en-US.ini
+++ b/options/locale/locale_en-US.ini
@@ -233,6 +233,7 @@ Content = Content
require_error = ` cannot be empty.`
alpha_dash_error = ` must be valid alphanumeric or dash(-_) characters.`
alpha_dash_dot_error = ` must be valid alphanumeric, dash(-_) or dot characters.`
+git_ref_name_error = ` must be well formed git reference name.`
size_error = ` must be size %s.`
min_size_error = ` must contain at least %s characters.`
max_size_error = ` must contain at most %s characters.`