Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2016-11-21 23:39:27 +0300
committerSean McGivern <sean@mcgivern.me.uk>2016-11-21 23:39:27 +0300
commit149df275dbabfe5c1e7d73291c8dc84269c6b42c (patch)
treea56e3cbfab4c329911467175a5f0fe12473dbb5e /lib
parent2449d787ad32b399b79bf89c756bc9165232ceb0 (diff)
parent5949f398f71d9cb540e42988c19fac2768c92eb8 (diff)
Merge branch 'dz-fix-500-group-git' into 'master'
Fix 500 error when group name ends with git Closes https://gitlab.com/gitlab-com/support-forum/issues/1298 Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/24742 See merge request !7630
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/regex.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb
index 47ea8b7e82e..c12358ceef4 100644
--- a/lib/gitlab/regex.rb
+++ b/lib/gitlab/regex.rb
@@ -9,7 +9,7 @@ module Gitlab
# `NAMESPACE_REGEX_STR`, with the negative lookbehind assertion removed. This means that the client-side validation
# will pass for usernames ending in `.atom` and `.git`, but will be caught by the server-side validation.
NAMESPACE_REGEX_STR_SIMPLE = '[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*[a-zA-Z0-9_\-]|[a-zA-Z0-9_]'.freeze
- NAMESPACE_REGEX_STR = "(?:#{NAMESPACE_REGEX_STR_SIMPLE})(?<!\.git|\.atom)".freeze
+ NAMESPACE_REGEX_STR = '(?:' + NAMESPACE_REGEX_STR_SIMPLE + ')(?<!\.git|\.atom)'.freeze
def namespace_regex
@namespace_regex ||= /\A#{NAMESPACE_REGEX_STR}\z/.freeze