Page MenuHomePhabricator

Show IP: Handle API errors on Special:Block
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

If I use the Show IP feature on Special:Block, and the API returns an error, the Show IP area is blank.

We could probably handle it more gracefully. For example, by showing an error.

Similar to the work done in T333190.

Steps to reproduce problem
  1. Login to the wiki on one browser
  2. Go to Special:Block
  3. On another browser, login to the same wiki as another user and block the user you logged in as in step 1
  4. Go back to the first browser, on Special:Block, and enter a valid temporary user into the username field
  5. Click "Show IP"

Expected behavior: Because the user is now blocked, there should be some sort of error.
Observed behavior: Nothing is shown, the output is blank.

Event Timeline

Just adding this here in case the patch for this task doesn't fix this which was also mentioned from https://phabricator.wikimedia.org/T333190#8907984

On the username invalid screenshot, I deleted *Unregistered 31. When I was checking out various pages to see if it has the same outcome, it has except on Special:Block. All the other pages it shows deleted but on Special:Block it still shows the IP address of the deleted user

T333190_IPMasking_IPReveal_DeletedSpecialBlock.png (315×3 px, 121 KB)

Change 929373 had a related patch set uploaded (by TsepoThoabala; author: TsepoThoabala):

[mediawiki/extensions/CheckUser@master] Show IP: Handle API errors on Special:Block

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

Change 929373 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Show IP: Handle API errors on Special:Block

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

@TThoabala It's showing "error" when the other user is blocked on another browser as seen from the screenshots below. As for https://phabricator.wikimedia.org/T338620#8919434, if it's fine for the Admin to still see the IP addresses when the User/IP is deleted, then we can move this to Done. Non-Admin does not see any IP addresses when the User/IP is deleted. Thanks!

OS: Safari 13.3
Browsers: Safari 16.4, Chrome 114

Before Testuserone was Blocked -IP address is shown

T338620_IPMasking_ShowIP_SpecialBlockError.png (1×3 px, 589 KB)

After Testuserone was Blocked- Displays "(error)"

T338620_IPMasking_ShowIP_SpecialBlockErrorAfter.png (1×3 px, 476 KB)

Base off https://phabricator.wikimedia.org/T338620#8919434. Admin can still see IP address even when the user/IP is deleted. Non-Admin doesn't see anything.

User DeletedAdmin Special:ContributionsAdmin Special:BlockNon-AdminSpecial:Contributions
T338620_IPMasking_ShowIP_UserDeleted.png (1×3 px, 672 KB)
T338620_IPMasking_ShowIP_UserDeleted_AdminContribution.png (436×3 px, 159 KB)
T338620_IPMasking_ShowIP_UserDeleted_AdminSpecialBlock.png (804×3 px, 206 KB)
T338620_IPMasking_ShowIP_UserDeleted_NonAdminContribution.png (546×3 px, 154 KB)