Page MenuHomePhabricator

Normalise IP addresses in HTMLUsersMultiselectField, to avoid adding multiple equivalent IP addresses
Open, MediumPublic

Description

It is not possible to add multiple equivalent usernames twice using the JS UsersMultiselectWidget, e.g. "Admin 1" and "Admin_1". Since T274568, this is also the case for the PHP widget.

However, in both modes, the widget treats equivalent IP addresses as separate entries:

This is problematic because:

  • Anything that handles the widget's values needs to ensure that the IP addresses are unique
  • If the widget has a limit set, it uses up extra entries for equivalent IPs

An example of where equivalents are (unintentionally) treated as two separate IP addresses downstream can be found in CheckUser:

Event Timeline

Niharika triaged this task as Medium priority.Tue, Feb 23, 3:21 PM
Niharika moved this task from Untriaged to Cards ready to be discussed on the Anti-Harassment board.
Tchanders renamed this task from Normalise IP addresses in HTMLSUsersMultiselectField, to avoid adding multiple equivalent IP addresses to Normalise IP addresses in HTMLUsersMultiselectField, to avoid adding multiple equivalent IP addresses.Tue, Feb 23, 4:58 PM