From: Marwin Hochfelsner <50826859+hlfan@users.noreply.github.com> Date: Thu, 12 Feb 2026 23:14:17 +0000 (+0100) Subject: Raise linkify regex timeout X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain?ds=inline Raise linkify regex timeout --- diff --git a/lib/rich_text.rb b/lib/rich_text.rb index 6f6fc1cef..5464edb17 100644 --- a/lib/rich_text.rb +++ b/lib/rich_text.rb @@ -112,7 +112,7 @@ module RichText expanded_path = "#{rule.host || "#{Settings.server_protocol}://#{Settings.server_url}"}/#{rule.path_template}" rule.patterns .select { |pattern| pattern.is_a?(String) } - .map { |pattern| [Regexp.new("(?<=^|#{URL_UNSAFE_CHARS})#{pattern}", Regexp::IGNORECASE, :timeout => 0.01), expanded_path] } + .map { |pattern| [Regexp.new("(?<=^|#{URL_UNSAFE_CHARS})#{pattern}", Regexp::IGNORECASE, :timeout => 0.05), expanded_path] } end end