diff options
author | Mario de la Ossa <mdelaossa@gitlab.com> | 2019-06-18 23:01:17 +0300 |
---|---|---|
committer | Mario de la Ossa <mdelaossa@gitlab.com> | 2019-06-18 23:01:17 +0300 |
commit | 82cdee2b7bfc004dba6c7ff45688145ba0a47983 (patch) | |
tree | e18b7e31fa5f1622e5b169eb0b95cc69d3a01d28 /lib | |
parent | f41d39f97288d17e0d88a60e61c1b046bd12aa66 (diff) |
Fix DOS when rendering issue/MR comments
Diffstat (limited to 'lib')
-rw-r--r-- | lib/banzai/filter/relative_link_filter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/banzai/filter/relative_link_filter.rb b/lib/banzai/filter/relative_link_filter.rb index 199b3533cf4..cdf97e75491 100644 --- a/lib/banzai/filter/relative_link_filter.rb +++ b/lib/banzai/filter/relative_link_filter.rb @@ -100,7 +100,7 @@ module Banzai end def relative_file_path(uri) - path = Addressable::URI.unescape(uri.path) + path = Addressable::URI.unescape(uri.path).delete("\0") request_path = Addressable::URI.unescape(context[:requested_path]) nested_path = build_relative_path(path, request_path) file_exists?(nested_path) ? nested_path : path |