You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!ENTITY local SYSTEM "file:///#{File.expand_path(__FILE__)}">
435
+
<!ENTITY custom "resolved>
436
+
]>
437
+
<doc><foo>&local;</foo><foo>&custom;</foo></doc>
438
+
EOF
439
+
440
+
doc=Doc.new
441
+
parser=Nokogiri::XML::SAX::Parser.new(doc)
442
+
parser.parse(xml)
443
+
444
+
assert_nil(doc.data)
445
+
end
446
+
447
+
it"does not resolve network external entities by default"do
448
+
xml=<<~EOF
449
+
<?xml version="1.0" encoding="UTF-8"?>
450
+
<!DOCTYPE doc [
451
+
<!ENTITY remote SYSTEM "http://0.0.0.0:8080/evil.dtd">
0 commit comments