Page MenuHomePhabricator

Parsoid/PHP roundtrip testing: Period ( . ) in titles fail with a http 403 (Invalid file extension found in the path info or query string.) error
Closed, ResolvedPublic

Description

For example, http://localhost:8003/resultFlagNew/8a52d29d682e477cd1ca027f0a198db2087d2bc3/PHP:6fa28acd/enwiki/G.729d (My ssh tunnel for scandium is on port 8003).

Here is a transcript from scandium:

ssastry@scandium:/srv/deployment/parsoid/deploy/src$ bin/roundtrip-test.js --proxyURL http://scandium.eqiad.wmnet:80 --parsoidURL http://DOMAIN/w/rest.php "G.729d"
Parser failure!

----------------------------------------------------------------------
Error: Got status code: 403; body: "<!DOCTYPE html>\n<html><head><title>Forbidden</title></head>\n<body><h1>Forbidden</h1><p>Invalid file extension found in the path info or query string.</p></body></html>\n"
Stack trace: Error: Got status code: 403; body: "<!DOCTYPE html>\n<html><head><title>Forbidden</title></head>\n<body><h1>Forbidden</h1><p>Invalid file extension found in the path info or query string.</p></body></html>\n"
    at /srv/deployment/parsoid/deploy/src/tools/ScriptUtils.js:499:10
    at /srv/deployment/parsoid/deploy/node_modules/prfun/lib/index.js:336:28
    at tryCatch1 (/srv/deployment/parsoid/deploy/node_modules/babybird/lib/promise.js:40:12)
    at promiseReactionJob (/srv/deployment/parsoid/deploy/node_modules/babybird/lib/promise.js:269:19)
    at PromiseReactionJobTask.call (/srv/deployment/parsoid/deploy/node_modules/babybird/lib/promise.js:284:3)
    at flush (/srv/deployment/parsoid/deploy/node_modules/asap/raw.js:50:29)
    at process._tickCallback (internal/process/next_tick.js:61:11)

ssastry@scandium:/srv/deployment/parsoid/deploy/src$ curl -x scandium.eqiad.wmnet:80 http://en.wikipedia.org/w/rest.php/en.wikipedia.org/v3/page/html/G.729d
<!DOCTYPE html>
<html><head><title>Forbidden</title></head>
<body><h1>Forbidden</h1><p>Invalid file extension found in the path info or query string.</p></body></html>

Why is this? What is the workaround for this?

Event Timeline

ssastry created this task.Wed, Sep 11, 2:09 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptWed, Sep 11, 2:09 AM
ssastry triaged this task as Normal priority.Wed, Sep 11, 2:09 AM

Here is a possible workaround that seems to work:

ssastry@scandium:~$ curl -x scandium.eqiad.wmnet:80 http://en.wikipedia.org/w/rest.php/en.wikipedia.org/v3/page/html/G.729d/
<!doctype html><title>Redirect</title><a href="http://en.wikipedia.org/w/rest.php/en.wikipedia.org/v3/page/html/G.729d/457575777">http://en.wikipedia.org/w/rest.php/en.wikipedia.org/v3/page/html/G.729d/457575777</a>

Change 535755 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Workaround for T232556

https://gerrit.wikimedia.org/r/535755

Change 535755 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Workaround for T232556

https://gerrit.wikimedia.org/r/535755

ssastry closed this task as Resolved.Wed, Sep 11, 6:16 PM
ssastry claimed this task.
ssastry moved this task from Backlog to Testing / QA on the Parsoid-PHP board.

We have a workaround for testing purposes. So resolving this. The bigger qn. that this triggered is covered in T232563.

Change 535956 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Another place to workaround T232556

https://gerrit.wikimedia.org/r/535956

Change 535956 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Another place to workaround T232556

https://gerrit.wikimedia.org/r/535956