Page MenuHomePhabricator

Account information blocked status includes expired blocks
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

In the Status column of the Account information table, a user will be reported as "Blocked" even if their block has expired.

It appears as if the isUserBlocked() method does not check the expiry field.

Steps to reproduce problem
  1. Go to Special:Block, block $user and for "Expiration" put "1 second"
  2. Go to Special:Investigate and start an investigation for $user
  3. Go to the "Account information" tab

Expected behavior: $user's status should be "Not blocked"
Observed behavior: $user's status is "Blocked"

Environment

Wiki(s): CheckUser 2.5 (e924e27) 06:20, 1 June 2022.

Screenshots

status_column.png (320×1 px, 41 KB)

Event Timeline

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

[mediawiki/extensions/CheckUser@master] Check expiry for blocks on accounts in Special:Investigate

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

Change 805494 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Check expiry of blocks in Special:Investigate account info tab

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

Done. Once DatabaseBlock can handle blocks cross-wiki it should ideally be converted to use DatabaseBlock so that it doesn't rely on the DB staying the same.