What is the problem?
When viewing edits from IPv6 addresses in Recent Changes with enhanced view enabled, it returns an error:
The IP address provided did not match the log or revision.
This is because it displays IPv6 addresses slightly differently. In most places they are shown like 2001:678:a08::, but here they are shown like 2001:678:A08:0:0:0:0:0. So, when we check whether the IP address matches what is returned by the API, it does not count as a match.
The IP needs to be normalised before comparison. Since T301174: Create IP utilities for sanitizing and prettifying IPs via js, we are now able to do this.
It only seems to affect Recent Change entries for edits, and only if you have the enhanced mode on. Log entries work, as they show IPv6 addresses like the former.
Steps to reproduce problem
- Make an edit from an IPv6 address (if your personal IP address is not IPv6, you can use a VPN or this script, doc here)
- Go to Special:Preferences, open the "Recent Changes" tab and make sure Group changes by page in recent changes and watchlist is checked.
- Go to Special:RecentChanges
- Click on the (i) button for the edit you made in step 1
Expected behavior: You should see the IP information
Observed behavior: You see an error
Environment
Wiki(s): Local docker IP Info 0.0.0 (41a1e35) 07:12, 17 January 2022.