Page MenuHomePhabricator

If the reason provided for a log entry is hidden, it is not hidden in the checkuser API response for an actions request
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

If a user does not have the rights to see the reason provided for a log entry, then it is not hidden in the response from the API.

Note: The reason associated with a log action was already not properly hidden before T341827 (so that refactor is not to blame), but this issue has been made more frequent by T361263.

For example:

The hidden state of the log entryThe log comment shown in the results
image.png (1×1 px, 184 KB)
image.png (266×803 px, 62 KB)
Steps to reproduce
  1. Perform a log action
  2. Load Special:RevisionDelete for the log
  3. Hide the Edit summary for that log action with the suppression option also checked
  4. Log into an account with the checkuser group but not suppressor
  5. Open Special:ApiSandbox and select action as query, list as checkuser, and then curequest as actions
  6. Enter the username that performed the log action in step 2 as the target and run the check
  7. Search for the log action in the results list

Event Timeline

Dreamy_Jazz changed the subtype of this task from "Task" to "Bug Report".Mar 28 2024, 7:39 PM

This does not need to be a security bug, as this is already a known public issue (as it was not possible to find the deleted status of the log comment before T324907).

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

[mediawiki/extensions/CheckUser@master] Add CheckUserLookupUtils::getManualLogEntryFromRow

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

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

[mediawiki/extensions/CheckUser@master] Apply log_deleted to entries in CheckUser API 'actions' type

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

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

[mediawiki/extensions/CheckUser@master] Add CheckUserLookupUtils::getRevisionRecordFromRow

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

Change #1017286 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add CheckUserLookupUtils::getManualLogEntryFromRow

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

Change #1017290 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Add CheckUserLookupUtils::getRevisionRecordFromRow

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

Change #1017294 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Apply log_deleted to entries in CheckUser API 'actions' type

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

dom_walden subscribed.

I set all the log events to have the same edit summary (which is easily searchable), hid all the log event edit summaries and did an ApiQueryCheckUser query for all the users and IPs in the cu_changes table. I then did a search for the edit summary. I could not find any references to it in any of the API responses.

I did this for hidden but not suppressed log entries for a checkuser without sysop rights and for hidden and suppressed entries for a checkuser with sysop but not suppressor rights.

Test environment: Local docker CheckUser 2.5 (eda557a) 19:43, 9 April 2024.