Page MenuHomePhabricator

Some user creation entries have incorrect Special:Log url
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

What is the problem?

When viewing some CheckUser entries for user creation, the (logs) link is to /w/index.php?title=Special:Log&page=User%3A, missing the username from the end.

It only seems to affect logs of the form:

  • (logs) .. <time> .. <username> (talk | contribs | block | check) was [automatically] created

which also affects automatic creation of temp users.

It also affects logs of emails being sent.

I notice these entries have a blank cuc_title in cu_changes, although this bug happens regardless of whether you have SCHEMA_COMPAT_READ_OLD or SCHEMA_COMPAT_READ_NEW.

Steps to reproduce problem
  1. As an anonymous (logged out) user, go to Special:CreateAccount and create a new user
  2. After creation you should be logged in as the new user
  3. Go to Special:CreateAccount again and create another new user
  4. Login as an admin user with checkuser permissions
  5. Go to Special:CheckUser, enter the name of the user you created in step 1, check the "Get edits" checkbox and submit

Expected behavior: You should see 4-5 entries. Clicking each of the "logs" links should take you to a valid URL (i.e. you shouldn't see any validation errors on the pages).
Observed behavior: The "logs" link for the second entry from the bottom is invalid.

  1. Submit the CheckUser form again, but for the user you created in step 3

Expected behavior: You should see 1 entry with a valid "logs" link.
Observed behavior: The "logs" link is invalid.

Environment

Wiki(s): local docker CheckUser 2.5 (d121f43) 16:23, 27 September 2023.

Screenshots

checkuser_account_creation_log_entry_comparison.png (109×897 px, 42 KB)

Event Timeline

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

[mediawiki/extensions/CheckUser@master] Define cuc_title and cupe_title where not defined

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

Dreamy_Jazz set the point value for this task to 1.Jan 4 2024, 9:19 PM

Change 987787 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Define cuc_title and cupe_title where not defined

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

I would suggest that QA steps be the steps to reproduce from the ticket description.

One difference that you will need to note is that Get edits is now renamed to Get actions (so you should replace any mention of Get edits in the steps with a mention of Get actions)

You can also test that sending a password reset email for an account (Special:PasswordReset) and sending an email have a valid URL for the logs link.

I tested creating an account as a named and temp user. The Special:CheckUser "logs" link was valid and was for the user who was created.

I tested emailing another user and resetting my users password. The "logs" link was valid and was for the current user.

Test environment: local docker CheckUser 2.5 (a72e799) 19:17, 18 January 2024.