From c7ef7d8a7387e427c394c3c0d03b8dd102e97b29 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 12 Jan 2020 09:15:46 +0900 Subject: [PATCH] Also ignored cve_2014_8080_spec --- spec/ruby/security/cve_2014_8080_spec.rb | 51 +++++++++++++----------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/spec/ruby/security/cve_2014_8080_spec.rb b/spec/ruby/security/cve_2014_8080_spec.rb index 64e22cf3a7..d881032ef7 100644 --- a/spec/ruby/security/cve_2014_8080_spec.rb +++ b/spec/ruby/security/cve_2014_8080_spec.rb @@ -1,32 +1,35 @@ require_relative '../spec_helper' -require 'rexml/document' -describe "REXML::Document.new" do +ruby_version_is ''...'2.8' do + require 'rexml/document' - it "resists CVE-2014-8080 by raising an exception when entity expansion has grown too large" do - xml = < - - - - - - - - - - - ]> - - %x9;%x9;%x9;%x9;%x9;%x9;%x9;%x9;%x9;%x9; - + describe "REXML::Document.new" do + + it "resists CVE-2014-8080 by raising an exception when entity expansion has grown too large" do + xml = < + + + + + + + + + + + ]> + + %x9;%x9;%x9;%x9;%x9;%x9;%x9;%x9;%x9;%x9; + XML - -> { - REXML::Document.new(xml).doctype.entities['x9'].value - }.should raise_error(REXML::ParseException, /entity expansion has grown too large/) - end + -> { + REXML::Document.new(xml).doctype.entities['x9'].value + }.should raise_error(REXML::ParseException, /entity expansion has grown too large/) + end + end end