Page MenuHomePhabricator

ipblock-exempt permissions (inherited through CentralAuth) seems to be ignored on enwiki
Closed, ResolvedPublicSecurity

Description

My global account is in the stewards' global group which includes both ipblock-exempt and globalblock-exempt permissions. That should allow my account to edit on all wikis even if the IP or IP range I am using (or any other member of said global group) is locally or globally "hardblocked" (i.e. logged-in users using that IP or network are prohibited to edit).

Since today, I am however no longer able to do so; not even my user page and I'm suspecting a Regression of some sort is happening as I've been able to edit without issues until today, and the oldest block I can find on the VPN range dates from May 2020.

An API query (action=query&meta=userinfo&uiprop=rights) on enwiki lists my account as indeed having ipblock-exempt and globalblock-exempt permissions.

Filing privately for precaution, just in case private info is needed to identify the causes.

Event Timeline

Not sure where the bug -if any- is: CentralAuth or core; so tagging both.

excluding automatic edits during global renames, which probably don't care about blocks if I remember correctly, the last edit you made appears to be http://en.wikipedia.org/wiki/Special:Diff/994765563 on 17 December 2020. This appears to have been before 1.36.0-wmf.22 reached enwiki, see T267415: 1.36.0-wmf.22 deployment blockers. So any regression would have been in the changes for .22 or .25 (since .23 and .24 were skipped).

Looking through the change logs on mediawiki, for both core and centralauth, I suspect https://gerrit.wikimedia.org/r/c/mediawiki/core/+/649910 is to blame
PermissionManager::userHasRight uses ::getUserPermissions which runs HookRunner::onUserGetRights which CentralAuth has a handler for to add global user rights, but PermissionManager::getGroupPermissions has no such hook running (or had, now its just a wrapper for the new GroupPermissionLookup service)

I was poking around gerrit as well and this seems to be the only recent ipblock-exempt-related change set that makes sense, given the timing of everything.

sbassett triaged this task as High priority.Jan 8 2021, 9:00 PM
sbassett changed the visibility from "Custom Policy" to "Public (No Login Required)".
sbassett moved this task from Incoming to Watching on the Security-Team board.

Change 654865 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Revert "Fix infinite recursion with wgAutopromote when using getBlock within checkCondition"

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

JJMC89 subscribed.

Please reset the edit policy.

MarcoAurelio changed the edit policy from "Custom Policy" to "All Users".Jan 8 2021, 9:28 PM
In T271551#6732856, @JJMC89 wrote:

Please reset the edit policy.

Done.

Change 655148 had a related patch set uploaded (by Paladox; owner: Paladox):
[mediawiki/core@master] Fix fetching ipblock-exempt within BlockManager#getUserBlock

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

Change 655147 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add a test for ipblock-exempt granted via hook

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

@Sotiale was hit by this in zhwiki.

With this speed, can we expect this to be fixed next year or two?

It's very good that I can't work because of this, but if this delays someone's requests, people who are angry with it will complain to someone. Please, solve this problem quickly.

Would the Anti-Harassment team be willing to review the attached patches as code stewards for blocks?

I'll have a look, hopefully later today.

Change 658940 had a related patch set uploaded (by Urbanecm; owner: Paladox):
[mediawiki/core@wmf/1.36.0-wmf.27] Fix fetching ipblock-exempt within BlockManager::getUserBlock

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

Change 658941 had a related patch set uploaded (by Urbanecm; owner: Paladox):
[mediawiki/core@wmf/1.36.0-wmf.28] Fix fetching ipblock-exempt within BlockManager::getUserBlock

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

Change 654865 abandoned by Urbanecm:
[mediawiki/core@master] Revert "Fix infinite recursion with wgAutopromote when using getBlock within checkCondition"

Reason:
a real fix was 2'ed

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

Change 658942 had a related patch set uploaded (by Urbanecm; owner: Paladox):
[mediawiki/core@REL1_35] Fix fetching ipblock-exempt within BlockManager::getUserBlock

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

Change 655147 merged by jenkins-bot:
[mediawiki/core@master] Add a test for ipblock-exempt granted via hook

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

Change 658942 merged by jenkins-bot:
[mediawiki/core@REL1_35] Fix fetching ipblock-exempt within BlockManager::getUserBlock

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

Change 658944 had a related patch set uploaded (by Paladox; owner: DannyS712):
[mediawiki/core@REL1_35] Add a test for ipblock-exempt granted via hook

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

Change 655148 merged by jenkins-bot:
[mediawiki/core@master] Fix fetching ipblock-exempt within BlockManager::getUserBlock

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

Paladox claimed this task.

Change 658940 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.27] Fix fetching ipblock-exempt within BlockManager::getUserBlock

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

Change 658941 merged by jenkins-bot:
[mediawiki/core@wmf/1.36.0-wmf.28] Fix fetching ipblock-exempt within BlockManager::getUserBlock

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

Mentioned in SAL (#wikimedia-operations) [2021-01-28T00:31:25Z] <urbanecm@deploy1001> Synchronized php-1.36.0-wmf.28/includes/: rMWa67fe4f7cbf1: Fix fetching ipblock-exempt within BlockManager::getUserBlock (T271551, T270145) (duration: 01m 07s)

Mentioned in SAL (#wikimedia-operations) [2021-01-28T00:33:10Z] <urbanecm@deploy1001> Synchronized php-1.36.0-wmf.27/includes/: rMWc5c39ba8b3fc: Fix fetching ipblock-exempt within BlockManager::getUserBlock (T271551, T270145) (duration: 01m 04s)

Change 658944 merged by jenkins-bot:
[mediawiki/core@REL1_35] Add a test for ipblock-exempt granted via hook

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