Make WordPress Core

Opened 17 months ago

Last modified 17 months ago

#45303 new defect (bug)

XML parsing should be done in chunks, causing parser out of memory

Reported by: amanmanglik Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.9.8
Component: Import Keywords:
Focuses: Cc:


SimplePie in wordpress reads xml as a single chunk instead of multiple chunks as recommended by xml_parse documentation. This is resulting is parser running out of memory internally and the error is gets suppressed. Its the cause for blogger importer plugin failing with >10MB xml files and possibly other issues.

Full context and a unpolished fix in the support thread here -

I have verified the bug and my fix on wordpress version 4.9.8 but i am guessing this has existed for a while.

Change History (3)

#1 @swissspidy
17 months ago

  • Component changed from General to Import

#2 @dd32
17 months ago

SimplePie is an external library WordPress uses, this should be reported upstream to them. Although WordPress uses an old version of the library, it looks like the code in question still exists: https://github.com/simplepie/simplepie/blob/master/library/SimplePie/Parser.php#L166-L172

#3 @amanmanglik
17 months ago

I will report it to SimplePie as well but i would request doing a local fix if SimplePie doesnt pick it up fast as Wordpress is the one being affected. Its essentially blocking all potential users who want to migrate from Blogger to WP but cant because their export wont load. My friend, whose blog i am helping with, gave up on the migration months back before involving me recently.

Version 0, edited 17 months ago by amanmanglik (next)
Note: See TracTickets for help on using tickets.