Page MenuHomePhabricator

Update CheckUser interfaces to autocreate a temporary account if an IP is running a check and temporary accounts are enabled
Open, LowPublic2 Estimated Story Points

Description

The CheckUserLogService is used to create a log entry in Special:CheckUserLog. This is done after a user makes a check using either the CheckUser API, Special:CheckUser, or Special:Investigate. However, these actions need an actor ID for the performer of the check which means that when a logged out user runs a check it will cause no log entry to be created.

To solve this we should update the CheckUser interfaces to create a temporary account as part of the check action. This means that the CheckUserLogService will not have a situation where it needs to create an actor ID for a IP address when temporary accounts are enabled.

While we could make it impossible for IPs to run checks, in {T346458} we made it possible to have checkuser logs for IP addresses running checks. Adding in an extra check (other than the checkuser user right) could complicate things on a private wiki.

Event Timeline

Dreamy_Jazz renamed this task from Update the CheckUserLogService to not try to acquire an actor ID for IP addresses to Update the CheckUser interfaces to autocreate a temporary account on a check to ensure an actor ID exists when creating a CheckUserLog and using temporary accounts.Feb 21 2024, 8:44 PM
Dreamy_Jazz renamed this task from Update the CheckUser interfaces to autocreate a temporary account on a check to ensure an actor ID exists when creating a CheckUserLog and using temporary accounts to Update CheckUser interfaces to autocreate a temporary account if an IP is running a check and temporary accounts are enabled.Feb 21 2024, 9:07 PM
Tchanders subscribed.

We discussed that this would would put the codebase in a consistent state following {T346458}, but that it's not urgent and shouldn't block temp accounts deployment on WMF production sites.

T346458 was a bit of a security hole if a site was ever configures to allow IP users to use checkuser, since it then wouldn't log their access properly. But it's unlikely a site would be configured that way, so I don't think we need to work on this any time soon.