Page MenuHomePhabricator

Validation of `domain` failed: mwparsoid-invalid-domain
Closed, ResolvedPublic

Description

Error

message
Validation of `domain` failed: mwparsoid-invalid-domain

Notes

Not sure why this validation failed since the domain fr.wikipedia.org looks right.

Details

Request ID
XbjbcwpAAO8AAGhlWQ8AAAAE
Request URL
/w/rest.php/fr.wikipedia.org/v3/page/pagebundle/Portail%3AHerp%C3%A9tologie%2FPage_au_hasard%2FListe/163976305
Stack Trace
exception.trace
#0 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/extension/src/Rest/Handler/ParsoidHandler.php(206): MWParsoid\Rest\Handler\ParsoidHandler->assertDomainIsCorrect(string)
#1 /srv/deployment/parsoid/deploy-cache/revs/aa59ce3d0aa035504666a63c99667398d0ea1928/src/extension/src/Rest/Handler/PageHandler.php(30): MWParsoid\Rest\Handler\ParsoidHandler->getRequestAttributes()
#2 /includes/Rest/Router.php(315): MWParsoid\Rest\Handler\PageHandler->execute()
#3 /includes/Rest/Router.php(285): MediaWiki\Rest\Router->executeHandler(MWParsoid\Rest\Handler\PageHandler)
#4 /includes/Rest/EntryPoint.php(116): MediaWiki\Rest\Router->execute(MediaWiki\Rest\RequestFromGlobals)
#5 /includes/Rest/EntryPoint.php(83): MediaWiki\Rest\EntryPoint->execute()
#6 /rest.php(31): MediaWiki\Rest\EntryPoint::main()
#7 /srv/mediawiki/w/rest.php(3): require(string)
#8 {main}
Related Gerrit Patches:
mediawiki/services/parsoid : masterExpose more information in domain validation error

Event Timeline

ssastry created this task.Wed, Oct 30, 3:10 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptWed, Oct 30, 3:10 AM
ssastry triaged this task as Normal priority.Wed, Oct 30, 3:10 AM
ssastry moved this task from Backlog to Bugs on the Parsoid-PHP board.Wed, Oct 30, 3:15 AM
ssastry assigned this task to Arlolra.Mon, Nov 4, 9:05 PM

From an example query, https://logstash.wikimedia.org/app/kibana#/dashboard/AW4Y6bumP44edBvO7lRc?_g=h@2d95062&_a=h@67f6f50

server	en.wikipedia.org
...
url	/w/rest.php/fr.wikipedia.org/v3/page/pagebundle/Portail%3AHerp%C3%A9tologie%2FPage_au_hasard%2FListe/163976305
wiki	enwiki

So, the error makes sense. The question is how did the request originate?

Change 549107 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] Add expose some information in domain validation error

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

https://logstash.wikimedia.org/app/kibana#/doc/logstash-*/logstash-2019.10.18/parsoid-php?id=AW3hGx5kP44edBvOu-tS&_g=h@2d95062

This one is a little more interesting,

server	wikidata.wikipedia.org
...
url	http://wikidata.wikipedia.org/w/rest.php/wikidata.wikipedia.org/v3/page/html/User%3ABeneBot*%2FRfD-open%2Ftext%2Ffr/727721388
wiki	wikidatawiki

Change 549107 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Expose more information in domain validation error

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

Krinkle added a subscriber: Krinkle.Wed, Nov 6, 9:52 PM

Things like .wikipedia.org showing up for non-Wikipedia sites is a telltale sing of something converting db names to domain names in a way that is unofficial and incompatible with how MediaWiki is configured at WMF. E.g. where it converts *wiki to wikipedia. In general, communication between two services either needs to be based solely on the db-name without involving a domain name, or needs to be given the domain name from the same source that it got the db-name from. Nothing outside wmf-config/multiversion should be manually converting from one to the other.

Dzahn added a subscriber: Dzahn.Wed, Nov 6, 9:55 PM

url /w/rest.php/fr.wikipedia.org/v3/page/pagebundle/Portail%3AHerp%C3%A9tologie%2FPage_au_hasard%2FListe/163976305
wiki enwiki
So, the error makes sense. The question is how did the request originate?

That looks like the URL we used for testing on T236833. If that just happened once or few times on October 29th then i think that was me doing the tests on T236833#5617838. I may have asked en.wikipedia for the fr.wikipedia page by accident once or twice.

Arlolra closed this task as Resolved.Wed, Nov 6, 10:05 PM

If that just happened once or few times on October 29th then i think that was me doing the tests

There were two groups of occurrences. On the 19th for wikidatawiki and on the 30th for enwiki (dates are according to what logstash is displaying for my timezone). For now we'll attribute them to you :)