Page MenuHomePhabricator

Allow temporary accounts to be blocked with 'hideuser'
Closed, ResolvedPublic1 Estimated Story PointsSecurity

Description

In T343705: Ensure temporary accounts cannot be suppressed via "hideuser", changes were made so that temporary accounts could not be blocked with hideuser enabled. This was done so that they would be similar to IP addresses (which cannot be blocked with hideuser).

However, if a user was to accidentally log out they could make edits using a temporary account. While this does not immediately display their IP address, the CheckUser extension allows users to reveal the IP used by a given temporary account. Therefore, by allowing temporary accounts to be blocked with hideuser enabled the IP address associated with the temporary account can be hidden from all but users with the ability to see suppressed information.

Investigation

  • Should the ability to block a temporary account with hideuser enabled be dependent on a configuration setting or be allowed in all situations.
Acceptance criteria
  • It should be possible to block temporary users with the hideuser option enabled, either by allowing in all cases or when a configuration setting is set.

QA Results - Local

Event Timeline

Dreamy_Jazz set Security to Software security bug.EditedJan 19 2024, 3:16 PM
Dreamy_Jazz changed the visibility from "Public (No Login Required)" to "Custom Policy".
Dreamy_Jazz changed the subtype of this task from "Task" to "Security Issue".

Marked as a security issue because it discusses what is filed in T355434. This ticket in itself does not need to have a security fix or have a security fix be backported.

I've uploaded a public patch for this as the task of this ticket isn't security protectable, but some of the description here is.

I went with allowing suppression in all cases because the extra complication added by configuration seemed to be unnecessary.

Suggested QA steps (can be performed on patchdemo or a local wiki):

  1. Enable temporary account creation
    1. On Patch Demo this is done by checking the IP Masking checkbox when creating the wiki for the test
    2. On a local wiki add $wgAutoCreateTempUser['enabled'] = true; to your LocalSettings.php (if this is not already enabled).
  2. Make a few testing edits using a temporary account, and note down the username for later use
  3. Log into an account with suppressor group
    1. If you do not have these rights, then log into an account with the bureaucrat group (patch demo user Patch Demo has this right)
      1. If you do not have the bureaucrat group on an account, then use run the following maintenance script: createAndPromote.php <username> --force --bureaucrat where <username> is replaced with the username of an existing account that you want to give this group to
    2. After granting logging into an account with the bureaucrat group, then go to Special:UserRights and use the form to add the suppressor group to the account to be used for the test
  4. Go to Special:Block and enter the username for the temporary account used in step 2
  5. Set the block duration to infinite.
  6. Verify that you can see a checkbox with the label Hide username from edits and lists and that it is not disabled.
  7. Check the Hide username from edits and lists checkbox.
  8. Click Block this user
  9. If asked to confirm, check the Confirm block checkbox and click Block this user again
  10. Go to Special:BlockList and verify that the temporary account username from step 2 is listed there with the block parameters including username hidden

@Dreamy_Jazz I was able to block temporary users with the hideuser option enabled as seen below and works as designed. I will move this to Done. Thanks for all your work and QA steps!

Status: ✅PASS
Environment: Local: 1.42.0-alpha (148bfa0) 17:17, 24 January 2024
OS: macOS Sonoma 14.2.1
Browser: Chrome 120, Firefox 121, Safari 17.2, Edge 120
Skins. Vector 2022, 2010, Minerva, Monobook, Timeless
Device: MBA M2
Emulated Device:: n/a
Test Links:
http://localhost:8080/w/index.php?title=Special:Block

✅AC1: https://phabricator.wikimedia.org/T355430

Special:BlockConfirm BlockSpecial:BlocklistRevison historyPartial Block Warning
2024-01-24_12-10-37.png (1×1 px, 228 KB)
2024-01-24_12-13-26.png (1×2 px, 267 KB)
2024-01-24_12-14-36.png (748×3 px, 187 KB)
2024-01-24_12-15-17.png (552×3 px, 212 KB)
2024-01-24_12-31-47.png (583×984 px, 111 KB)
This comment was removed by Dreamy_Jazz.

Can this be be made public now that T355434 is resolved?

Urbanecm changed the visibility from "Custom Policy" to "Public (No Login Required)".Nov 24 2024, 12:23 AM