mirror of
https://github.com/php/php-src.git
synced 2024-11-24 18:34:21 +08:00
Merge branch 'PHP-5.5' into PHP-5.6
* PHP-5.5: Fixed DOM tests when using libxml2 versions patched against CVE-2014-0191
This commit is contained in:
commit
6eaadc0228
@ -12,6 +12,7 @@ require_once dirname(__FILE__) .'/skipif.inc';
|
||||
// reusing existing xml: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.xml?view=co&content-type=text%2Fplain
|
||||
// reusing existing dtd: http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/dom.ent?view=co&content-type=text%2Fplain
|
||||
$dom = new DOMDocument('1.0');
|
||||
$dom->substituteEntities = true;
|
||||
$dom->load(dirname(__FILE__).'/dom.xml');
|
||||
var_dump($dom->validate());
|
||||
?>
|
||||
|
@ -7,18 +7,22 @@ require_once('skipif.inc');
|
||||
--FILE--
|
||||
<?php
|
||||
$domDocument = new DOMDocument();
|
||||
$domDocument->substituteEntities = true;
|
||||
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_0.xml");
|
||||
var_dump($domDocument->doctype->internalSubset);
|
||||
|
||||
$domDocument = new DOMDocument();
|
||||
$domDocument->substituteEntities = true;
|
||||
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_1.xml");
|
||||
var_dump($domDocument->doctype->internalSubset);
|
||||
|
||||
$domDocument = new DOMDocument();
|
||||
$domDocument->substituteEntities = true;
|
||||
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug67081_2.xml");
|
||||
var_dump($domDocument->doctype->internalSubset);
|
||||
|
||||
$domDocument = new DOMDocument();
|
||||
$domDocument->substituteEntities = true;
|
||||
$domDocument->load(dirname(__FILE__) . DIRECTORY_SEPARATOR . "dom.xml");
|
||||
var_dump($domDocument->doctype->internalSubset);
|
||||
?>
|
||||
|
@ -37,6 +37,7 @@ libxml_set_external_entity_loader(
|
||||
);
|
||||
|
||||
$dd = new DOMDocument;
|
||||
$dd->substituteEntities = true;
|
||||
$dd->resolveExternals = true;
|
||||
$r = $dd->loadXML($xml);
|
||||
var_dump($dd->validate());
|
||||
|
Loading…
Reference in New Issue
Block a user