Page MenuHomePhabricator

CentralAuthIdLookup: Enforce that UserIdentity objects belong to the right wiki in isAttached()
Open, Needs TriagePublic

Description

CentralAuthIdLookup::isAttached() takes a $wikiId parameter, but it also takes a UserIdentity object that has a wiki ID associated with it. We should enforce that the two wiki IDs match, to avoid programming errors. However, the last time we tried it, it caused problems with the GlobalUserPage extension (T374122).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change #1071006 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/CentralAuth@master] CentralAuthIdLookup: Assert that user belongs to the right wiki

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

Change #1070970 had a related patch set uploaded (by Bartosz Dziewoński; author: Zabe):

[mediawiki/extensions/GlobalUserPage@master] Do not use full User objects for cross-wiki stuff in GlobalUserPage

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

I'm not planning to work on this right now, it's free for taking if anyone wants to look into it. Current status is that the proposed GlobalUserPage change seems to work, but its CI isn't configured in a way that would allow the tests to pass with the change.