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:
authorGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-11-26 20:03:39 +0300
committerGitLab Release Tools Bot <robert+release-tools@gitlab.com>2019-11-26 20:03:39 +0300
commitef6512ad8f7fc86ab67f210b6ca2754790e4564f (patch)
tree8d9ea54cf3da9939592d14a1208cf262dd67a199 /spec
parent79a183ea8dee98900cfb495611c3342f6f312df0 (diff)
parent5bdc90c2799db3fdabe8cd95c7a194c3ef825873 (diff)
Merge branch 'security-dos-issue-and-commit-comments-12-5' into '12-5-stable'
Fix invalid byte sequence See merge request gitlab/gitlabhq!3547
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