Page MenuHomePhabricator

Investigate CheckUser currently saving failed login attempted to usernames which fail RIGOR_VALID
Closed, ResolvedPublic

Description

To achieve read new, the LogFormatter is used to display events specific just to CheckUser (such as logins). While I cannot seem to re-produce this locally, on WMF wikis store failed login attempts when the username is an IP address.

Example row from enwiki which currently uses the old schema and thus actiontext in the wiki's content language (IP address removed for privacy reasons):

Screenshot 2023-07-25 124720.png (36×1 px, 16 KB)

The LogFormatter expects that the username meets the RIGOR_VALID constraint, which IP addresses do not. As such, a InvalidArgumentException would be thrown and the results list would not display.

As such, to ensure the rows can be displayed usernames that are IP addresses should be accepted by the log formatter and displayed as IP addresses.

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.

Event Timeline

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

[mediawiki/extensions/CheckUser@master] Allow IP addresses as usernames in CheckUserPrivateEventLogFormatter

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

I have preliminary chosen to collect and display login attempts to usernames that fail the RIGOR_VALID constraint. This is done so that IPs can be displayed.

A wider discussion could be had about whether collecting failed login attempts where the username is an IP address is a good idea, but that can be done later if desired. My first thought is that the migration should not affect any of the data shown, other than to improve it (i.e. translation of the action text in the user's chosen language instead of the wiki content language).

Change 941471 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Allow IP addresses as usernames in CheckUserPrivateEventLogFormatter

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