Page MenuHomePhabricator

"This user is currently blocked" show always the newest block, which is sometimes not the current
Closed, DeclinedPublic


When viewing the Edits of a blocked user, it says "This user is currently blocked". Then the newest block is shown, but not the current (if the current block lasts longer than the longest block).

For example, this happens here:

An one-year-block from 2006 is shown, as the one-year-block was issued one minute after the indef block, it would be correct if the indef block would be shown.

Event Timeline

Milad_A380 raised the priority of this task from to Low.
Milad_A380 updated the task description. (Show Details)
Milad_A380 added a subscriber: Milad_A380.

There shouldn't be a difference between the "current block" and the "newest block" in the first place. This case can't happen as of now, because if you block a user who is already blocked the page correctly responds with ~"the user is already blocked". So it seems some check was introduced after the example above was generated. It means this issue only comes up with really old blocks. I'm not quite sure if those very rare cases are worth the effort.

To solve this bug as far as I can tell we need another database query which looks up the current block in ipblocks table, joins against the logging table and looks the number of block log entries which belong to the specified user, aren't suppressed and are newer or equally old to the creation time of the current block and finally need to take that value (minus one) as the offset for the log excerpt.

Krinkle added a subscriber: Krinkle.

Closing for now. It seems indeed that this issue no longer exists. Feel free to re-open if you find it again.