diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-02-07 14:26:00 -0600 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-02-07 14:26:00 -0600 |
commit | 2666ef9f04b6a130f342a23124cad927ac1c6068 (patch) | |
tree | 3f765ed0662d8ee6fd3421ccb3887698da0f33a4 /lib | |
parent | 636e9bdd11bdb60d9711c3d3ba66406b6d8967ae (diff) | |
download | gitlab-ce-2666ef9f04b6a130f342a23124cad927ac1c6068.tar.gz |
Use stricter regex anchorsroute-map-string-source
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/route_map.rb | 2 |
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 |