diff options
author | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-11-26 20:02:26 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-11-26 20:02:26 +0300 |
commit | f18305402702ebf1c06f5ddf6ab9a62e8b131d0e (patch) | |
tree | 5e5a527cc309d85b5fac99a205c57dcdbddc3457 /spec/lib | |
parent | f92bc7b10d35624bda7ae7db0e9034955587c9a1 (diff) | |
parent | 53834c1874a6a26c0805046e1f580a233f170bd8 (diff) |
Merge branch 'security-dos-issue-and-commit-comments-master' into 'master'
Fix invalid byte sequence
See merge request gitlab/gitlabhq!3545
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/banzai/filter/relative_link_filter_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/lib/banzai/filter/relative_link_filter_spec.rb b/spec/lib/banzai/filter/relative_link_filter_spec.rb index 046c346a7ac..371c7a2347c 100644 --- a/spec/lib/banzai/filter/relative_link_filter_spec.rb +++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb @@ -119,6 +119,11 @@ describe Banzai::Filter::RelativeLinkFilter do expect { filter(act) }.not_to raise_error end + it 'does not raise an exception on URIs containing invalid utf-8 byte sequences' do + act = link("%FF") + expect { filter(act) }.not_to raise_error + end + it 'does not raise an exception with a garbled path' do act = link("open(/var/tmp/):%20/location%0Afrom:%20/test") expect { filter(act) }.not_to raise_error |