Last modified: 2013-07-04 10:34:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T46969, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 44969 - Parsoid crashes when serializing page with colon in title
Parsoid crashes when serializing page with colon in title
Status: RESOLVED INVALID
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized critical
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-13 19:42 UTC by Roan Kattouw
Modified: 2013-07-04 10:34 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Roan Kattouw 2013-02-13 19:42:42 UTC
Send a POST request with any content at all to a Parsoid URL containing a colon, and you'll get strange crashes. Strangely, the behavior differs between localhost and enwiki:

POST /localhost/VisualEditor%3AMetastuff HTTP/1.0
Host: localhost:8000
Content-Length: 3

HTTP/1.1 500 Internal Server Error
X-Powered-By: Express
Content-Type: text/html; charset=utf-8
Content-Length: 66
Connection: close

ParserError: Failed to parse the JSON response for Page Fetch null

(Note that I didn't even get a chance to send the POST body, the 500 occurs as soon as I send the double newline that terminates the request header.)

For this case, the Parsoid log shows:
ParserError: Failed to parse the JSON response for Page Fetch null
worker 10132 died, restarting.


POST /en/Talk%3AWQKO HTTP/1.0
Host: localhost:8000
Content-Length: 3

Foo

[Parsoid closes the connection without sending anything]

Parsoid log:
There was an error in the HTML5 parser! Sending it back to the editor.
Error: No source to parse
    at EventEmitter.parse (/var/lib/parsoid/Parsoid/js/node_modules/html5/lib/html5/parser.js:44:20)
    at /var/lib/parsoid/Parsoid/js/api/ParserService.js:579:6
    at /var/lib/parsoid/Parsoid/js/api/ParserService.js:284:4
    at /var/lib/parsoid/Parsoid/js/lib/mediawiki.parser.environment.js:185:3
    at [object Object].<anonymous> (/var/lib/parsoid/Parsoid/js/lib/mediawiki.parser.environment.js:209:4)
    at Array.1 (/var/lib/parsoid/Parsoid/js/lib/mediawiki.ApiRequest.js:60:4)
    at EventEmitter._tickCallback (node.js:192:40)
TypeError: Cannot read property 'childNodes' of undefined
    at /var/lib/parsoid/Parsoid/js/api/ParserService.js:597:34
    at /var/lib/parsoid/Parsoid/js/api/ParserService.js:284:4
    at /var/lib/parsoid/Parsoid/js/lib/mediawiki.parser.environment.js:185:3
    at [object Object].<anonymous> (/var/lib/parsoid/Parsoid/js/lib/mediawiki.parser.environment.js:209:4)
    at Array.1 (/var/lib/parsoid/Parsoid/js/lib/mediawiki.ApiRequest.js:60:4)
    at EventEmitter._tickCallback (node.js:192:40)
Comment 1 Roan Kattouw 2013-02-13 19:50:28 UTC
(In reply to comment #0)
> POST /localhost/VisualEditor%3AMetastuff HTTP/1.0
> Host: localhost:8000
> Content-Length: 3
> 
> HTTP/1.1 500 Internal Server Error
> X-Powered-By: Express
> Content-Type: text/html; charset=utf-8
> Content-Length: 66
> Connection: close
> 
> ParserError: Failed to parse the JSON response for Page Fetch null
> 
Ignore this one, this is due to a misconfiguration on my end.

> POST /en/Talk%3AWQKO HTTP/1.0
> Host: localhost:8000
> Content-Length: 3
> 
> Foo
> 
> [Parsoid closes the connection without sending anything]
> 
> Parsoid log:
> There was an error in the HTML5 parser! Sending it back to the editor.
And this behavior occurs on the command line but not from my browser, for some reason.
Comment 2 Andre Klapper 2013-07-04 10:34:01 UTC
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links