1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/security/cve_2019_8321_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
501 B
Ruby
Raw Normal View History

require_relative '../spec_helper'
2022-04-25 08:53:54 -04:00
require 'rubygems'
require 'rubygems/user_interaction'
2022-04-25 08:53:54 -04:00
describe "CVE-2019-8321 is resisted by" do
it "sanitising verbose messages" do
ui = Class.new {
include Gem::UserInteraction
}.new
ui.should_receive(:say).with(".]2;nyan.")
verbose_before = Gem.configuration.verbose
begin
Gem.configuration.verbose = :really_verbose
ui.verbose("\e]2;nyan\a")
ensure
Gem.configuration.verbose = verbose_before
end
end
end