Page MenuHomePhabricator

Expose IP masking (temporary user creation) configuration in the API
Closed, ResolvedPublic

Description

As I was working on T335530, I realized that external tools have no way to tell whether logged-out users will get an auto-created account when editing or not. We should add it.

  • action=query&prop=info&intestactions=...:
    • Add &intestactionsautocreate=1 to also check whether the actions would result in a creation of a temporary user account.
  • action=query&meta=siteinfo:
    • Add &siprop=autocreatetempuser to output the configuration of temporary user accounts.

Event Timeline

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

[mediawiki/core@master] Expose automatic temporary user creation configuration in the API

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

Change 912951 merged by jenkins-bot:

[mediawiki/core@master] Expose automatic temporary user info in the API

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

matmarex updated the task description. (Show Details)
matmarex added a project: Skipped QA.

Bartosz and I checked the API output for logged-out users from the API sandbox page for both IP masking enabled and disabled.
When intestactions is set to edit and intestactionsautocreate is enabled:

For IP masking enabled environment we get the following response where

"wouldautocreate": {
                    "edit": true
                }

Screenshot 2023-10-25 at 5.15.57 PM.png (1×2 px, 379 KB)

For IP masking disabled environment we get the following response where

"wouldautocreate": {
                    "edit": false
                }

Screenshot 2023-10-25 at 4.41.12 PM.png (1×2 px, 380 KB)