diff options
author | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-06-27 00:40:51 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-06-27 00:40:51 +0300 |
commit | 1c7019fcbd4ce8216d64fd5dd392ce8de8c9a98e (patch) | |
tree | 2a2b54a64619245d0b55e9003bbb176a71412189 /lib | |
parent | 0279476e55b16bc43c9bce0c45831570c9e1d51f (diff) | |
parent | e639f476ba83157ae9e66d080f8405daacfbbd56 (diff) |
Merge branch 'security-DOS_issue_comments_banzai-12-0' into '12-0-stable'
Fix DOS when rendering issue/MR comments
See merge request gitlab/gitlabhq!3171
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 80c84c0f622..bf84d7cddae 100644 --- a/lib/banzai/filter/relative_link_filter.rb +++ b/lib/banzai/filter/relative_link_filter.rb @@ -102,7 +102,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 |