Page MenuHomePhabricator

Block notice box should prioritize direct IP blocks
Closed, ResolvedPublic

Description

The following was probably introduced by rMWc0107b8. Consider the following scenario:

  1. Block a single IP (say, 255.255.255.255)
  2. Block a CIDR range containing that IP (say, 255.255.255.254/31)
Capture.PNG (1,040×115 px, 34 KB)

On Special:Contributions/255.255.255.255, we get a block notice box like:

Capture.PNG (1,816×356 px, 58 KB)

I think the block for 255.255.255.255 should be prioritized here since it's most relevant. For other things:

  • The remove block and change block links point to the (indirect) block for 255.255.255.254/31.
  • Users (especially sysops) viewing the contributions page are most likely interested in whether the specific IP (255.255.255.255) itself is directly blocked.

However, the caveat is:

  • If we change this behavior to show the direct block, the displayed log entry will no longer necessarily be the most recent one, even though the notice includes the message The latest active block log entry is provided below for reference:.

I think we can disregard the last point, prioritizing relevance over recency, but feedback on this trade-off would be appreciated.

Details

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I’ve thought this through and verified that we can just tweak the interface message for multi-blocked IPs, like replacing “The latest” in it with “The most relevant”.

Change #1197009 had a related patch set uploaded (by Dragoniez; author: Dragoniez):

[mediawiki/core@master] Prioritize direct IP blocks in block notice box

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

Change #1197009 merged by jenkins-bot:

[mediawiki/core@master] Prioritize direct IP blocks in block notice box

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