Commit 2666ef9f authored by Douwe Maan's avatar Douwe Maan

Use stricter regex anchors

parent 636e9bdd
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment