diff options
author | Nobuyoshi Nakada <[email protected]> | 2022-08-07 17:57:52 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2022-08-07 17:57:52 +0900 |
commit | 03f86565a69687b335d16d873e2b1f35cb356bec (patch) | |
tree | 701849a5ad91b01bb1774b2ced5ccd845c30d905 | |
parent | 0bb5525eb2966b5821eb714c898b1c9c33221660 (diff) |
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.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/6220
Merged-By: nobu <[email protected]>
-rw-r--r-- | spec/ruby/security/cve_2019_8325_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/ruby/security/cve_2019_8325_spec.rb b/spec/ruby/security/cve_2019_8325_spec.rb index 04692e01fe..7c5e216568 100644 --- a/spec/ruby/security/cve_2019_8325_spec.rb +++ b/spec/ruby/security/cve_2019_8325_spec.rb @@ -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 |