Project

General

Profile

Feature #32424 » 0006-Fixes-HTTP-500-error-when-invalid-URIs-are-provided-.patch

Marius BĂLTEANU, 2021-07-04 12:21

View differences:

lib/redmine/wiki_formatting/common_mark/external_links_filter.rb
next unless url
next if url.starts_with?("/") || url.starts_with?("#") || !url.include?(':')
scheme = URI.parse(url).scheme
next if scheme.blank?
begin
scheme = URI.parse(url).scheme
next if scheme.blank?
rescue URI::InvalidURIError
next
end
klass = node["class"].presence
node["class"] = [
(14-14/26)