Page MenuHomePhabricator

[BUG] CentralAuth hide/suppress does not block Special:EmailUser
Open, Needs TriagePublicBUG REPORT

Description

What is the problem?

A user who is hidden/suppressed via Special:CentralAuth can still use Special:EmailUser.

Special:EmailUser does not use PermissionManager::getPermissionErrors(), so does not trigger the onGetUserPermissionsErrorsExpensive hook which CentralAuth uses.

When suppressing a user, CentralAuth automatically creates a local database block which blocks the user from email. However, this block could be removed or not created in the first place if the user already has a block.

Steps to reproduce problem

Need to be logged in as a user with centralauth-oversight right

  1. Go to Special:CentralAuth/$user
  2. Click on the "Account is hidden completely" radio button, and then "Set status"
  3. CentralAuth automatically creates local database blocks. To simulate where it has failed to create a local block, go to Special:BlockList, find the newly created block, and unblock it
  4. Login as $user, go to Special:EmailUser

Expected behavior: You are blocked with a message like "You cannot edit because your account is blocked."
Observed behavior: You can send an email.

Event Timeline

Note, for WMF wikis - in practice we don't hide users unless we are also locking users, which will alleviate the user story

But I'm a bit lost, is this user story "When someone is unblocked (step 3) - they are not blocked" ?

This story leaves off setting "lock" at all - why would you expect an error that you are locked, if you are not locked?

Without having the user story updated, this looks like it can be closed as not a bug.

I have no memory of raising this bug...

Note, for WMF wikis - in practice we don't hide users unless we are also locking users, which will alleviate the user story

Cool.

But I'm a bit lost, is this user story "When someone is unblocked (step 3) - they are not blocked" ?

I guess that step is to simulate where CentralAuth is not able to create the local block (e.g. the user already has a partial block against them).

This story leaves off setting "lock" at all - why would you expect an error that you are locked, if you are not locked?

That was perhaps just a typo.