Page MenuHomePhabricator

Cannot create global block via API unless user exists locally
Closed, DuplicatePublicBUG REPORT

Description

What is the problem?

If a user exists on one wiki but I try to create a global block via the API against them from another wiki, it returns:

{
    "error": {
        "code": "baduser",
        "info": "Invalid value \"~2024-24539\" for user parameter \"target\".",
...

Occurs for both temporary and named accounts.

Steps to reproduce problem
  1. Make an edit on https://de.wikipedia.beta.wmflabs.org to make a temporary account
  2. Login as a steward on https://meta.wikimedia.beta.wmflabs.org
  3. Go to https://meta.wikimedia.beta.wmflabs.org/wiki/Special:ApiSandbox#action=globalblock&format=json&target=%3Cusername%3E&expiry=infinite&reason=jklsjdflks, replace the <username> with the temporary account you created in step 1 and submit

Expected behaviour: Global block is created.
Observed behaviour: Validation error.

Environment

Wiki(s): https://meta.wikimedia.beta.wmflabs.org GlobalBlocking – (ce531e3) 14:02, 22 October 2024.