summaryrefslogtreecommitdiff
path: root/spec/lib/banzai
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 21:07:38 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-02 21:07:38 +0000
commit9d54184f308893338967b18874dedebf38acf89e (patch)
tree100e32c6d4b34deac52d9e98a083361d89804b50 /spec/lib/banzai
parentd5b5f5e6e1474d5526add9033c9754b8e395841f (diff)
downloadgitlab-ce-9d54184f308893338967b18874dedebf38acf89e.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/banzai')
-rw-r--r--spec/lib/banzai/filter/relative_link_filter_spec.rb9
1 files changed, 9 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 a17a645d4d0..9f467d7a6fd 100644
--- a/spec/lib/banzai/filter/relative_link_filter_spec.rb
+++ b/spec/lib/banzai/filter/relative_link_filter_spec.rb
@@ -128,6 +128,15 @@ 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 in uploads' do
+ act = link("/uploads/%FF")
+ expect { filter(act) }.not_to raise_error
+ end
+
+ it 'does not raise an exception on URIs containing invalid utf-8 byte sequences in context requested path' do
+ expect { filter(link("files/test.md"), requested_path: '%FF') }.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