Author: cmue81
Description:
Uploading a 70mb SVG file created with Inkscape fails, due to "uploadinvalidxml" exception thrown. The SVG contains a large embedded png, so variing the chunk size between 500kb to 5mb does not matter: lots of upload chunks will simply contain a base64 encoded string only.
I suspect this to be the reason for verifyPartialFile to reject chunks as invalidxml, but ultimately am not 100% sure: Shouldn't a test on well-formed-ness of XML be always done on the stashed (complete) file rather than on the chunks? This test for wellformedness within the scope of verifyPartialFile has been introduced by bug 58553, maybe regression!?
The backtrace to this is about verifyChunk() -> verifyPartialFile() -> detectScriptInSVG() -> XmlTypeCheck->wellformed == false.
Relevant code entries are to be found here:
function verifyChunk():
https://doc.wikimedia.org/mediawiki-core/master/php/html/UploadFromChunks_8php_source.html#l00364
https://doc.wikimedia.org/mediawiki-core/master/php/html/UploadFromChunks_8php_source.html#l00369
https://doc.wikimedia.org/mediawiki-core/master/php/html/UploadFromChunks_8php_source.html#l00373
function verifyPartialFile():
https://doc.wikimedia.org/mediawiki-core/master/php/html/UploadBase_8php_source.html#l00481
https://doc.wikimedia.org/mediawiki-core/master/php/html/UploadBase_8php_source.html#l00507
function detectScriptInSVG():
https://doc.wikimedia.org/mediawiki-core/master/php/html/UploadBase_8php_source.html#l01255
https://doc.wikimedia.org/mediawiki-core/master/php/html/UploadBase_8php_source.html#l01265
Thanks for dedicating time to fix this.
Version: 1.24rc
Severity: normal