Page MenuHomePhabricator

CU 2.0: InvestigateBlock does not normalise IP range when leaving notice
Closed, ResolvedPublicBUG REPORT


What is the problem?

If I use Special:InvestigateBlock to block and use the Leave a notice on User/User Talk page functionality, the notice is posted on User/User_talk:

The normalised version of that IP range is, so perhaps User/User_talk: is where the notice should be posted.

Steps to reproduce problem
  1. Go to Special:InvestigateBlock
  2. For target, enter
  3. Add a Reason
  4. Check Leave a notice on User page and enter a message
  5. Submit

Expected behavior: The message from step 4 is on User:, since this is the range that is actually blocked (e.g. see Special:BlockList).
Observed behavior: The message is on User:


Wiki(s): MediaWiki 1.36.0-alpha (ed5d593), CheckUser 2.5 (1309125).

Screenshots (if applicable):


Notice posted on User:

User: without notice:

Event Timeline

Change 646629 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/extensions/CheckUser@master] Normalize IP range target of block notice

Change 646629 merged by jenkins-bot:
[mediawiki/extensions/CheckUser@master] Normalize IP range target of block notice

dom_walden added a subscriber: STran.

We now normalise IP ranges when posting to User/User_talk pages. So, blocking will leave a notice on User/User_talk:

This is tested for both IPv4 (thanks @STran) and IPv6.

From what I can tell, the change only affects how we normalise the titles of respective user/user_talk. It does not affect creating blocks in any way.

Just in case, though, I briefly did some regression testing of the blocking functionality of Special:InvestigateBlock. It behaves as it did before.

I notice the IP in the success message (The user is now blocked) is not normalised, remains exactly as you entered it. I wonder if this should be normalised as well.

If I block several ranges which all normalise to the same range, the User/User_talk page will have multiple notices written to it. For example, blocking, and will cause the same notice to be written three times on User/User_talk: (if using "Append" or "Prepend"). I am not sure if this is likely to happen in practice, or whether it is a big deal even if it does.

Test environment: Local vagrant MediaWiki 1.36.0-alpha (8bbd351), CheckUser 2.5 (60b16bb).