Page MenuHomePhabricator

m.wikidata: login status not detected
Open, NormalPublic

Description

Expected behavior
GIVEN I am successfully logged in on the desktop site, e.g. https://www.wikidata.org/
WHEN I open the mobile site, e.g. https://m.wikidata.org/
THEN I am logged as the same user

Actual behavior
GIVEN I am successfully logged in on the desktop site, e.g. https://www.wikidata.org/
WHEN I open the mobile site, e.g. https://m.wikidata.org/
THEN my logged in status is not detected and I can not make use of it

Technical insights
When opening the mobile login page, e.g. https://m.wikidata.org/w/index.php?title=Special:UserLogin&returnto=Wikidata%3AMain+Page&returntoquery=, the requests that try to facilitate the login can be inspected.
Apparently requests get sent against login.wikimedia.org but are answered in a wrong way for the wikidata domain - the Location header instructs our browser to connect to "https://www.m.wikidata.org/..." which is incorrect (stray "www.").

Applies to both production and beta.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 14 2019, 12:55 PM

Seems to also happen for mediawiki.org.
Does not happen on test.wikidata.org.

Network connection stack trace:
...
https://login.wikimedia.org/wiki/Special:CentralAutoLogin/checkLoggedIn?type=script&wikiid=wikidatawiki&mobile=1&proto=https&mobile=1
https://www.m.wikidata.org/wiki/Special:CentralAutoLogin/createSession?token=...&type=script&proto=https&mobile=1

I believe (but I do not claim to be right on this one) the issue happens inside https://github.com/wikimedia/mediawiki-extensions-CentralAuth/blob/e7ff08db5325ba0d1a4728dcc3d70df06a0cec7f/includes/specials/SpecialCentralAutoLogin.php#L608-L625

Not very extensive testing around MobileContext::getMobileUrl has not identify issues over there. Current working hypothesis of mine is that it is WikiMap::getForeignURL what adds the superfluous www. to the URL.

Would be great to get word from the MediaWiki-extensions-CentralAuth people if they have a suspicion where this problem originates from.

WMDE-leszek triaged this task as High priority.Mon, Jun 17, 2:25 PM

Pinging maintainers according to https://www.mediawiki.org/wiki/Developers/Maintainers: @hoo, @vvv, @csteipp, @Legoktm: any idea why mediawiki.org and wikidata.org might behave special (and arguably incorrect)?

WMDE-leszek lowered the priority of this task from High to Normal.Mon, Jun 17, 3:44 PM
Lea_WMDE moved this task from Backlog to Other on the Wikidata-Termbox-Hike board.
Pablo-WMDE updated the task description. (Show Details)Tue, Jun 18, 8:26 AM

It is a bit concerning to see this has not been triaged by the maintainers after more than 3 weeks.