зеркало из https://github.com/github/ruby.git
Silent backtrace from cve_2019_8325_spec.rb
Since the change at f310ac1cb2
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:
Родитель
0bb5525eb2
Коммит
03f86565a6
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче