Skip to content
Snippets Groups Projects
Commit 2666ef9f authored by Douwe Maan's avatar Douwe Maan
Browse files

Use stricter regex anchors

parent 636e9bdd
No related branches found
No related tags found
1 merge request!9046Support a string source in the route map
Pipeline #
......@@ -35,7 +35,7 @@ def parse_entry(entry)
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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment