Page MenuHomePhabricator

De-duplicate equivalent IP ranges in HTMLUsersMultiselectField
Closed, ResolvedPublic3 Estimated Story Points

Description

Following T275394: Normalise IP addresses in HTMLUsersMultiselectField, to avoid adding multiple equivalent IP addresses, we need to do similar de-duplication for equivalent IP ranges.

From T275394#6938008:

Duplicates we are still not removing:

  • 192.168.1.2 and 192.168.1.2/32 are treated as different, even though technically they are the same (same goes for IPv6).
  • 192.168.123.0/24 and 192.168.123.123/24 are treated as different, even though they are the same (same goes for IPv6).

Event Timeline

Niharika set the point value for this task to 3.Mar 24 2021, 4:49 PM

Change 674938 had a related patch set uploaded (by TsepoThoabala; author: TsepoThoabala):
[mediawiki/core@master] De-duplicate equivalent IP ranges in HTMLUsersMultiselectField

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

Change 674938 merged by jenkins-bot:
[mediawiki/core@master] De-duplicate equivalent IP ranges in HTMLUsersMultiselectField

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

dom_walden added a subscriber: dom_walden.

Testing Special:Investigate:

  • /32 (or /128 for IPv6) IP ranges and their equivalent single IPs are de-duplicated
  • Equivalent IP ranges are de-duplicated (in IPv4 and IPv6)

I checked that the correct CheckUser database queries in the backend.

I also checked that we can still submit Usernames via Special:Investigate and in the email blacklist in Special:Preferences.

Test environment: local docker MediaWiki 1.36.0-alpha (db82214) 10:47, 26 March 2021.