diff options
author | Heinrich Lee Yu <hleeyu@gmail.com> | 2019-01-09 11:55:29 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2019-01-31 18:51:16 +0300 |
commit | 219d24fe5298f6ca5a16d4392360fe1f691aee97 (patch) | |
tree | 54038050e7e813a006f1a1e546e41aadbaa9e2d5 /app | |
parent | 68d13322290a52360cd485d24bcfff995d98cf97 (diff) |
Fix slow project reference pattern regex
Diffstat (limited to 'app')
-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 |