diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-03 10:01:03 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-12-03 10:01:33 +0000 |
commit | 4298ed4662edbf43235d8cea3299ea35e06b982a (patch) | |
tree | baa7996492fe58fb58aaaafb398a32efae5e2f6b /spec | |
parent | f6e02a44a16ed3f4580b2040d319624e2e9407dd (diff) | |
download | gitlab-ce-4298ed4662edbf43235d8cea3299ea35e06b982a.tar.gz |
Add latest changes from gitlab-org/security/gitlab@14-3-stable-ee
Diffstat (limited to 'spec')
-rw-r--r-- | spec/lib/gitlab/quick_actions/extractor_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/quick_actions/extractor_spec.rb b/spec/lib/gitlab/quick_actions/extractor_spec.rb index 61fffe3fb6b..c040a70e403 100644 --- a/spec/lib/gitlab/quick_actions/extractor_spec.rb +++ b/spec/lib/gitlab/quick_actions/extractor_spec.rb @@ -352,6 +352,14 @@ RSpec.describe Gitlab::QuickActions::Extractor do expect(commands).to eq(expected_commands) expect(msg).to eq expected_msg end + + it 'fails fast for strings with many newlines' do + msg = '`' + "\n" * 100_000 + + expect do + Timeout.timeout(3.seconds) { extractor.extract_commands(msg) } + end.not_to raise_error + end end describe '#redact_commands' do |