Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorPatrick Derichs <pderichs@gitlab.com>2019-11-22 15:56:24 +0300
committerPatrick Derichs <pderichs@gitlab.com>2019-11-22 16:39:54 +0300
commit5bdc90c2799db3fdabe8cd95c7a194c3ef825873 (patch)
treed53a4c0b3c7869850b114ddd4bbbe2b2b8b02489 /spec
parent1f0ab8978eff64f520348952fdbdd6dc5e9e9161 (diff)
Fix invalid byte sequence
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/banzai/filter/relative_link_filter_spec.rb5
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