diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-21 11:52:54 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-24 14:47:49 +0200 |
commit | 1d2a5ee1887bd767ede8c84babb1868954c38e6f (patch) | |
tree | ffcbdc5b3f5056a7afdb4976c3fbd2374505826b /lib/gitlab/regex.rb | |
parent | 6ae606d81f12d363e02c1dc0b5b9904d431a9a3a (diff) | |
download | gitlab-ce-1d2a5ee1887bd767ede8c84babb1868954c38e6f.tar.gz |
Revert "Revert disallowing usernames to end in period."
This reverts commit c75c6b840ba9ed82bb01eca52e968c2b0ec985e6.
Diffstat (limited to 'lib/gitlab/regex.rb')
-rw-r--r-- | lib/gitlab/regex.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/regex.rb b/lib/gitlab/regex.rb index 9aeed5e6939..0571574aa4f 100644 --- a/lib/gitlab/regex.rb +++ b/lib/gitlab/regex.rb @@ -2,7 +2,7 @@ module Gitlab module Regex extend self - NAMESPACE_REGEX_STR = '(?:[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*)'.freeze + NAMESPACE_REGEX_STR = '(?:[a-zA-Z0-9_\.][a-zA-Z0-9_\-\.]*[a-zA-Z0-9_\-]|[a-zA-Z0-9_])'.freeze def namespace_regex @namespace_regex ||= /\A#{NAMESPACE_REGEX_STR}\z/.freeze @@ -10,7 +10,7 @@ module Gitlab def namespace_regex_message "can contain only letters, digits, '_', '-' and '.'. " \ - "Cannot start with '-'." \ + "Cannot start with '-' or end in '.'." \ end |