Page MenuHomePhabricator

Incorrect "change block" link when viewing from a blocked IP address
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Assume you have block permission, and you are accessing a site from a blocked IP address (only tested with global blocked)
  • When accessing some user's contribution page (don't know for a certain criteria)

What happens?:
There's "change block"(change-blocklink) and "unblock"(unblocklink) link on this page

What should have happened instead?:
There should only exist a "block" link, as this user is not blocked on this site.

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):
As a wikidata sysop, I could reproduce this issue on user Arthur011hk and Ericliu1912. Maybe on more users, but uncertain about this.

image.png (177×1 px, 27 KB)


See also: T323876: Locked user has "change block" link from contribution page

Event Timeline

I noticed this in the Finnish WP where I'm an admin and I edit via a VPN which is often blocked. I think I currently see the incorrect links for all other users except administrators.

However, not reproducible on my local test wiki. This might suggest it has something to do with multiple wikis.

Change 881461 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/core@master] specials: Replace User::getBlock with DatabaseBlock::newFromTarget

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

Change 881461 abandoned by Umherirrender:

[mediawiki/core@master] specials: Replace User::getBlock with DatabaseBlock::newFromTarget

Reason:

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

Hi, I suspect that this has been fixed by commit 92641cee as part of T326256, can anyone verify?

Hi, I suspect that this has been fixed by commit 92641cee as part of T326256, can anyone verify?

Fixed from my side. Thanks!