Silent backtrace from cve_2019_8325_spec.rb
Since the change at f310ac1cb2964f635f582862763b2155aacf2c12 to show the backtraces by default, this test started to show the backtraces. As the backtraces are not the subject of this test, silence them by using Gem::SilentUI.
This commit is contained in:
parent
0bb5525eb2
commit
03f86565a6
Notes:
git
2022-08-07 17:58:18 +09:00
Merged: https://github.com/ruby/ruby/pull/6220 Merged-By: nobu <nobu@ruby-lang.org>
@ -5,8 +5,16 @@ require 'rubygems/command_manager'
|
||||
|
||||
describe "CVE-2019-8325 is resisted by" do
|
||||
describe "sanitising error message components" do
|
||||
silent_ui = Module.new do
|
||||
attr_accessor :ui
|
||||
def self.extended(obj)
|
||||
obj.ui = Gem::SilentUI.new
|
||||
end
|
||||
end
|
||||
|
||||
it "for the 'while executing' message" do
|
||||
manager = Gem::CommandManager.new
|
||||
manager.extend(silent_ui)
|
||||
def manager.process_args(args, build_args)
|
||||
raise StandardError, "\e]2;nyan\a"
|
||||
end
|
||||
@ -26,6 +34,7 @@ describe "CVE-2019-8325 is resisted by" do
|
||||
|
||||
it "for the 'loading command' message" do
|
||||
manager = Gem::CommandManager.new
|
||||
manager.extend(silent_ui)
|
||||
def manager.require(x)
|
||||
raise 'foo'
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user