Page MenuHomePhabricator

Running a "get edits" check on user with no edits gives fatal exception
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Navigate to [[Special:CheckUser]] on a SUL wiki
  • Run a check (using the "Get edits" option) for a user who is CU "stale" (no loggable CU actions in 90 days)

Reproducible on commonswiki & loginwiki

What happens?:

screenshot.446.jpg (38×681 px, 21 KB)

One receives a Fatal exception of type "Error"

What should have happened instead?:
The software should prompt that the user has no data within the time window (as it does for "Get IP addresses")

Event Timeline

AmandaNP added a subscriber: Dreamy_Jazz.

@Dreamy_Jazz As this may have been related to a recent patch

Get users also fails the same way.

Can a CU/stew prioritize how bad this is?

Re-producable for 'Get edits' locally. Also found the issue (I think):

return $this->getCheckUserHelperFieldset()->getHTML( false );

The getCheckUserHelperFieldset() method returns null when there are no edits, so this should have checked for null.

Only occurs when a user or IP has no results and while running 'get edits'/'get users'

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

[mediawiki/extensions/CheckUser@master] Check for null when using ::getCheckUserHelperFieldset

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

This issue also does not prevent logging of the check on my local environment:

image.png (620×1 px, 47 KB)

image.png (873×1 px, 218 KB)

image.png (78×1 px, 21 KB)

The above patch fixes this issue.

Based on the above (not preventing logging), I think it should be fine for this to be an issue until the next train rolls around. This (in summary) is because:

  • This does not prevent logging the check to Special:CheckUserLog
  • This only occurs when no results would be shown to the CheckUser, therefore no results are hidden.

Change 923723 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Check for null when using ::getCheckUserHelperFieldset

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

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

[mediawiki/extensions/CheckUser@wmf/1.41.0-wmf.10] Check for null when using ::getCheckUserHelperFieldset

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

Change 923635 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@wmf/1.41.0-wmf.10] Check for null when using ::getCheckUserHelperFieldset

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

Mentioned in SAL (#wikimedia-operations) [2023-05-30T09:42:10Z] <zabe@deploy1002> Started scap: Backport for [[gerrit:923635|Check for null when using ::getCheckUserHelperFieldset (T337599)]]

Mentioned in SAL (#wikimedia-operations) [2023-05-30T09:43:48Z] <zabe@deploy1002> zabe: Backport for [[gerrit:923635|Check for null when using ::getCheckUserHelperFieldset (T337599)]] synced to the testservers: mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug2002.codfw.wmnet, mwdebug1001.eqiad.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-05-30T09:52:03Z] <zabe@deploy1002> Finished scap: Backport for [[gerrit:923635|Check for null when using ::getCheckUserHelperFieldset (T337599)]] (duration: 09m 52s)

Dreamy_Jazz claimed this task.

Looks like this can be closed as the change seems to be on all wikis now (just tested it on the English Wikipedia when processing a sockpuppets investigation case).