Page MenuHomePhabricator

SecurePoll: not-centrally-blocked does not distinguish partial and sitewide blocks
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

On the Voter Eligibility form, Must not be blocked on too many attached wikis counts both partial and sitewide blocks.

So, someone might be prevented from voting even though they are only partially blocked from wikis, even if the election does not ban partially blocked voters otherwise (e.g. Must not be partial blocked is unchecked).

Potential solutions:

  • Only count sitewide blocks
  • Have some option which allows the admin to set whether it counts partial blocks or not

Similar to the work in T268800.

Steps to reproduce problem
  1. Create a remote election (i.e. select "All Wikis" in the "For wiki" dropdown)
  2. Go to Special:SecurePoll/votereligibility/$id
  3. Check Must not be blocked on too many attached wikis and put 1 in the number input
  4. Partially block a user from a connected wiki
  5. Login as that user and try to vote
Environment

Wiki(s): https://vote.wikimedia.org SecurePoll 3.0.0 (b1a04e4) 10:51, 9 August 2021.

Event Timeline

jrbs triaged this task as High priority.Sep 23 2022, 10:30 PM
jrbs moved this task from Backlog to Needs evaluation on the MediaWiki-extensions-SecurePoll board.

Evaluation:

Medium to high risk, as Extension:CentralAuth is involved. Apparently we can retrieve the proper block status though. Change in LocalAuth class of SecurePoll seems to be sufficient. See also https://gerrit.wikimedia.org/g/mediawiki/extensions/CentralAuth/+/e319f7b7c6692621c254d064d46098d8345761fe/includes/User/CentralAuthUser.php#2786

Change #1112119 had a related patch set uploaded (by Amdrel; author: Amdrel):

[mediawiki/extensions/SecurePoll@master] Differentiate partial and sitewide blocks for central block threshold

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

Amdrel changed the task status from Open to In Progress.Jan 17 2025, 12:38 AM

The patch I added doesn't count partial blocks against the central block threshold if 'Must not be partial blocked' is unchecked. I saw it was mentioned in the original description that we might want an admin toggle for this. Please let me know if this is something we want for this patch.

The patch I added doesn't count partial blocks against the central block threshold if 'Must not be partial blocked' is unchecked. I saw it was mentioned in the original description that we might want an admin toggle for this. Please let me know if this is something we want for this patch.

@jrbs do you have a preference?

@jrbs do you have a preference?

It's a bit challenging to make a call without data but my anecdotal understanding of partial blocks is:

  • They are fairly rare (compared to regular blocks)
  • Users are usually only partially blocked from a small number of pages at a time

I cannot think of a situation in which, assuming my above assumptions are true, users might want to prevent those people from voting in elections. So I don't think the admin toggle is necessary. Scrutineers can of course also strike the vote after it is made already if for whatever reason a partial block should prevent voting.

Change #1112119 merged by jenkins-bot:

[mediawiki/extensions/SecurePoll@master] Differentiate partial and sitewide blocks for central block threshold

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

Novem_Linguae subscribed.

I assume the merged patch resolved this one. Marking as resolved. If not, feel free to re-open.

I cannot think of a situation in which, assuming my above assumptions are true, users might want to prevent those people from voting in elections. So I don't think the admin toggle is necessary.

I agree. Might make sense to create a follow-up ticket to remove [ ] Must not be partially blocked from voter eligibility completely.