Skip to content

Commit

Permalink
test: repro for #2296
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Aug 28, 2021
1 parent ea3ab46 commit 9eab65e
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/xml/test_schema.rb
Expand Up @@ -214,6 +214,21 @@ def test_xsd_with_dtd
end
end

def test_xsd_import_with_no_systemid
# https://github.com/sparklemotion/nokogiri/pull/2296
xsd = <<~EOF
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/1998/Math/MathML"
targetNamespace="http://www.w3.org/1998/Math/MathML"
>
<xs:import/>
</xs:schema>
EOF
Nokogiri::XML::Schema(xsd) # assert_nothing_raised
end

describe "CVE-2020-26247" do
# https://github.com/sparklemotion/nokogiri/security/advisories/GHSA-vr8q-g5c7-m54m
let(:schema) do
Expand Down

0 comments on commit 9eab65e

Please sign in to comment.