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/app
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-06-01 01:11:15 +0300
committerDouwe Maan <douwe@selenight.nl>2017-06-01 01:11:17 +0300
commit371ae05c15f0a523585c67cdaa15605b617ef037 (patch)
treed2db072882128c6bf3e5cfd501c5de2dd84412f7 /app
parent322c9be816cd5cd9747a8737ec04622aa6b81e6b (diff)
Don't match email addresses or foo@bar as user references
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 9aad327b592..9e13e91536d 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -369,6 +369,7 @@ class User < ActiveRecord::Base
# Pattern used to extract `@user` user references from text
def reference_pattern
%r{
+ (?<!\w)
#{Regexp.escape(reference_prefix)}
(?<user>#{Gitlab::PathRegex::FULL_NAMESPACE_FORMAT_REGEX})
}x