diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-09 16:55:29 +0800 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-31 16:51:16 +0100 |
commit | 219d24fe5298f6ca5a16d4392360fe1f691aee97 (patch) | |
tree | 54038050e7e813a006f1a1e546e41aadbaa9e2d5 /app/models/project.rb | |
parent | 68d13322290a52360cd485d24bcfff995d98cf97 (diff) | |
download | gitlab-ce-219d24fe5298f6ca5a16d4392360fe1f691aee97.tar.gz |
Fix slow project reference pattern regex
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index da77479fe1f..4057b564738 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -530,6 +530,7 @@ class Project < ActiveRecord::Base def reference_pattern %r{ + (?<!#{Gitlab::PathRegex::PATH_START_CHAR}) ((?<namespace>#{Gitlab::PathRegex::FULL_NAMESPACE_FORMAT_REGEX})\/)? (?<project>#{Gitlab::PathRegex::PROJECT_PATH_FORMAT_REGEX}) }x |