summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-02-07 14:26:00 -0600
committerDouwe Maan <douwe@selenight.nl>2017-02-07 14:26:00 -0600
commit2666ef9f04b6a130f342a23124cad927ac1c6068 (patch)
tree3f765ed0662d8ee6fd3421ccb3887698da0f33a4 /lib
parent636e9bdd11bdb60d9711c3d3ba66406b6d8967ae (diff)
downloadgitlab-ce-2666ef9f04b6a130f342a23124cad927ac1c6068.tar.gz
Use stricter regex anchorsroute-map-string-source
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/route_map.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/route_map.rb b/lib/gitlab/route_map.rb
index f96c30b3e33..72d00abfcc2 100644
--- a/lib/gitlab/route_map.rb
+++ b/lib/gitlab/route_map.rb
@@ -35,7 +35,7 @@ module Gitlab
source_pattern = source_pattern[1...-1].gsub('\/', '/')
begin
- source_pattern = Regexp.new("^#{source_pattern}$")
+ source_pattern = /\A#{source_pattern}\z/
rescue RegexpError => e
raise FormatError, "Route map entry source is not a valid regular expression: #{e}"
end