diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-18 11:28:18 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-02-18 11:28:18 +0400 |
commit | 020078663e401798d199a1a293ac59d990f81dad (patch) | |
tree | 6a142474a0fdd838b9348d794e680737a44c22e7 /lib/gitlab/regex.rb | |
parent | cfdf94fc279e45ddbe0bbb94022a7488c663501c (diff) |
Prevent xss attack over group name. Added regex validation for group and team name
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 483042205ea..5eeb7c80184 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -10,6 +10,10 @@ module Gitlab /\A[a-zA-Z][a-zA-Z0-9_\-\. ]*\z/ end + def name_regex + /\A[a-zA-Z0-9_\-\. ]*\z/ + end + def path_regex default_regex end |