summaryrefslogtreecommitdiff
path: root/lib/api/files.rb
diff options
context:
space:
mode:
authorTimothy Andrew <mail@timothyandrew.net>2016-11-16 17:54:43 +0530
committerTimothy Andrew <mail@timothyandrew.net>2016-11-18 11:47:37 +0530
commit78b6d6624be3a6d59710bf766e7253c2e6787f5a (patch)
tree1c563db6ffaa38d2772c8fcf9092abd9d80a6bda /lib/api/files.rb
parentb33791d8b94f5b41699996414e7fa2ce06e2f519 (diff)
downloadgitlab-ce-78b6d6624be3a6d59710bf766e7253c2e6787f5a.tar.gz
Allow registering users where the username contains dots (.).
Javascript does not support the negative lookbehind assertion (?<!) used in the Ruby regex (to disallow usernames ending in `.git` or `.atom`. Getting the client side code to fully support this format is non-trivial, since we'd either have to heavily complicate the regex used, or modify the frontend code to support more complex validation schemes (it currently uses HTML5 validations). The pragmatic choice is to create a `Gitlab::Regex::NAMESPACE_REGEX_STR_SIMPLE` regex to serve as a Javascript-compatible version of `NAMESPACE_REGEX_STR`. The client-side code will not display an error for usernames ending in `.git` and `.atom`, but these will be caught by the server-side validation.
Diffstat (limited to 'lib/api/files.rb')
0 files changed, 0 insertions, 0 deletions