Page MenuHomePhabricator

DjVu renderer doesn't handle malformed filenames properly
Closed, DeclinedPublic

Description

Author: bayo.fr

Description:
Testing the syntaxe, i hit a bug :

[[Image:Katia.djvu&page=2|100px|page 2]]

with a previw button

display me :

exception 'Exception' with message 'String could not be parsed as XML' in
/usr/local/apache/common-local/php-1.5/includes/Image.php:2302 Stack trace: #0
/usr/local/apache/common-local/php-1.5/includes/Image.php(2302):
SimpleXMLElement->__construct('a:0:{}') #1
/usr/local/apache/common-local/php-1.5/includes/Image.php(2276):
Image->initializeMultiPageXML() #2
/usr/local/apache/common-local/php-1.5/includes/Linker.php(442):
Image->selectPage('2') #3
/usr/local/apache/common-local/php-1.5/includes/Parser.php(4431):
Linker->makeImageLinkObj(Object(Title), '', '', '', 100, false, false, false,
'', '2') #4 /usr/local/apache/common-local/php-1.5/includes/Parser.php(1737):
Parser->makeImage(Object(Title), '100px|page 2') #5
/usr/local/apache/common-local/php-1.5/includes/Parser.php(1016):
Parser->replaceInternalLinks('
DjVu
...') #6 /usr/local/apache/common-local/php-1.5/includes/Parser.php(301):
Parser->internalParse('== DjVu ==??Bon...') #7
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(1451):
Parser->parse('== DjVu ==??Bon...', Object(Title), Object(ParserOptions)) #8
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(991):
EditPage->getPreviewText() #9
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(428):
EditPage->showEditForm() #10
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(266):
EditPage->edit() #11
/usr/local/apache/common-local/php-1.5/includes/Wiki.php(391):
EditPage->submit() #12
/usr/local/apache/common-local/php-1.5/includes/Wiki.php(50):
MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title),
Object(User), Object(WebRequest)) #13
/usr/local/apache/common-local/php-1.5/index.php(47):
MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User),
Object(WebRequest)) #14 /usr/local/apache/common-local/live-1.5/index.php(3):
require('/usr/local/apac...') #15 {main}


[[Image:Toto|page 2]]

display me :

exception 'Exception' with message 'String could not be parsed as XML' in
/usr/local/apache/common-local/php-1.5/includes/Image.php:2302 Stack trace: #0
/usr/local/apache/common-local/php-1.5/includes/Image.php(2302):
SimpleXMLElement->__construct('a:0:{}') #1
/usr/local/apache/common-local/php-1.5/includes/Image.php(2276):
Image->initializeMultiPageXML() #2
/usr/local/apache/common-local/php-1.5/includes/Linker.php(442):
Image->selectPage('2') #3
/usr/local/apache/common-local/php-1.5/includes/Parser.php(4431):
Linker->makeImageLinkObj(Object(Title), '', '', '', false, false, false, false,
'', '2') #4 /usr/local/apache/common-local/php-1.5/includes/Parser.php(1737):
Parser->makeImage(Object(Title), 'page 2') #5
/usr/local/apache/common-local/php-1.5/includes/Parser.php(1016):
Parser->replaceInternalLinks('fsdfsd?fsdf?sdf...') #6
/usr/local/apache/common-local/php-1.5/includes/Parser.php(301):
Parser->internalParse('fsdfsd?fsdf?sdf...') #7
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(1453):
Parser->parse('fsdfsd?fsdf?sdf...', Object(Title), Object(ParserOptions)) #8
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(991):
EditPage->getPreviewText() #9
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(428):
EditPage->showEditForm() #10
/usr/local/apache/common-local/php-1.5/includes/EditPage.php(266):
EditPage->edit() #11
/usr/local/apache/common-local/php-1.5/includes/Wiki.php(391):
EditPage->submit() #12
/usr/local/apache/common-local/php-1.5/includes/Wiki.php(50):
MediaWiki->performAction(Object(OutputPage), Object(Article), Object(Title),
Object(User), Object(WebRequest)) #13
/usr/local/apache/common-local/php-1.5/index.php(47):
MediaWiki->initialize(Object(Title), Object(OutputPage), Object(User),
Object(WebRequest)) #14 /usr/local/apache/common-local/live-1.5/index.php(3):
require('/usr/local/apac...') #15 {main}


[[Image:Toto|Page 2]]

dont create bug


Version: unspecified
Severity: normal

Details

Reference
bz8481

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:32 PM
bzimport added a project: MediaWiki-DjVu.
bzimport set Reference to bz8481.
bzimport added a subscriber: Unknown Object (MLST).

Can't replicate either situation. Closing as WORKSFORME (must've been fixed at some point).