What is the problem?
If I global block a username with an autoblock against their IP, if I make an API request to action=query&list=globalblocks and set the bgtargets=<username>|<user's ip>, the response will include both the global block against the user and their respective autoblock.
You do have to guess the user's IP correctly.
I don't believe the global autoblock feature is switched on in any production environment.
Steps to reproduce problem
- On a wiki with both GlobalBlocking and CheckUser installed
- Find out what your IP is on a wiki (e.g. while logged out go to Special:MyTalk)
- Login as a regular user and make an edit (so your IP is recorded by CheckUser)
- Login as an admin who can create global blocks
- Go to Special:GlobalBlock
- Enter the user from step 3 as target and make sure Automatically globally block the last IP address used by this user, and any subsequent IP addresses they try to edit from, for a period of 1 day is checked (it is by default). Submit the block.
- Go to Special:ApiSandbox#action=query&list=globalblocks&bgtargets=<username>|<user ip> (replace <username> and <user ip> with the IP from step 1 and the user from step 3). Submit.
Expected behaviour: The API only returns one block for the username.
Observed behaviour: The API returns two blocks.
Environment
Wiki(s): local docker GlobalBlocking – (6d5fb35) 16:55, 21 October 2024.