Page MenuHomePhabricator

Autoblock may not be created if user is not in local actor table or localuser
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

What is the problem?

If I create an account on one wiki and globally autoblock it from a different wiki, the autoblock will not be created.

If you create the global block from the wiki they created the account on, the autoblock will be created.

I think this is because if the user does not have the associated entry in localuser for the wiki you are creating the global block from and/or they don't have an entry in the local actor table then GlobalBlockingHandler::fetchIPAddressesFromLocalWiki() won't get an IP address.

If a user has used an IP on one wiki then I assume it is OK to use that on a global autoblock from another wiki.

I have reproduce this for named users.

To reproduce for temporary users you have to go to Special:CentralAuth/<temp user> and unmerge them from the wiki you are creating the global block from. Otherwise, T378032 will prevent the global block from being created.

I have only reproduced this locally. I cannot reproduce on beta (because it does not have CheckUser) or on testwiki (because I don't have the appropriate rights).

Steps to reproduce problem
  1. With two wikis which are part of the same CentralAuth family.
  2. On one wiki, create a named user (e.g. Special:CreateAccount).
  3. On a different wiki, login as a steward and try to global autoblock the user you created in step 2.

Expected behaviour: On Special:GlobalBlockList you will see an autoblock has been created.
Observed behaviour: No autoblock is created. Only an account block.

Environment

Wiki(s): local docker GlobalBlocking – (fd5d3ce) 11:58, 30 October 2024.

Event Timeline

Change #1085387 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] [WIP] Allow retroactive autoblocks for users with no local account

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

Change #1085387 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Allow retroactive autoblocks for users with no local account

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

I cannot reproduce the bug for either named and temporary accounts.

Test environment: local docker GlobalBlocking – (8d702dc) 07:23, 25 November 2024.