User "Hashar" posted a comment on MediaWiki.r96655.

Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96655#c22257
Commit summary:

Commit live hack: pass XML_PARSE_HUGE (code uses 1 << 19 because the constant 
isn't available for some reason) into DOMDocument::loadXML() if the first call 
to loadXML() failed. This prevents newer versions of libxml2 from throwing a 
warning and messing up when the XML contains structures that are nested more 
than 256 levels deep. RELEASE-NOTES added to the 1.18 file, tagging this for 
backporting to 1.18 too.

We at Wikimedia never noticed this issue until we upgraded libxml2 on one of 
our servers as part of an OS upgrade, but apparently the interwebs knew about 
this since at least May 2010. Hat tip
 to http://deriksmith.livejournal.com/57617.html , where I found this fix.

Comment:

Related to PHP bug: https://bugs.php.net/bug.php?id=49660

The bug appear with libxml2.7.3+ and was fixed in PHP libxml extension as of:

 version 5.3.2 - 04-Mar-2010
 version 5.2.12 - 17-Dec-2009

Look for PARSEHUGE in PHP changelog: http://php.net/ChangeLog-5.php

Preprocessor_DOM could define the constant itself if it does not exist.

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to