dbarratt created this task.
dbarratt added a project: MediaWiki-extensions-WikibaseRepository.
Restricted Application added a subscriber: Aklapper.
Restricted Application added a project: Wikidata.

TASK DESCRIPTION
  This task is a follow up to the discussion 
<https://www.wikidata.org/wiki/Wikidata:Property_proposal/IP_range_start> on 
Wikidata.
  
  **Problem**
  There is no way to query an IP address range in IPv4 routing prefix 
<https://www.wikidata.org/wiki/Property:P3761> or IPv6 routing prefix 
<https://www.wikidata.org/wiki/Property:P3793>. The string itself, of course, 
//can// be queried, but it is impossible to determine if a given IP address 
exists within the the stored range.
  
  **Example**
  Given the IP address `198.35.26.5` it is impossible to reason that the IP 
address belongs to Wikimedia Foundation <https://www.wikidata.org/wiki/Q180>.
  
  **Why Now?**
  During the #anti-harassment 
<https://phabricator.wikimedia.org/tag/anti-harassment/> offsite, we discussed 
many potential improvements to #checkuser 
<https://phabricator.wikimedia.org/tag/checkuser/>. One idea was to provide a 
reverse IP address lookup. This would give stewards details about an IP address 
and help them make sock <https://www.wikidata.org/wiki/Q798599> judgements. 
Many stewards already use non-free (as in speech) tools for this purpose. The 
Wikidata community already finds IP ranges as valuable data (via the creation 
of the two aforementioned properties). It might be wise to utilize this data 
for the community.
  
  **Proposed Solution**
  Based on the solution proposed in the discussion 
<https://www.wikidata.org/wiki/Wikidata:Property_proposal/IP_range_start#Discussion>,
 the best solution would be to fix the //storage// rather than duplicating the 
data.
  
  Create a new data type <https://www.wikidata.org/wiki/Help:Data_type> that 
extends from quantity <https://www.wikidata.org/wiki/Help:Data_type#Quantity>. 
This new data type would be able to store a single IP address in decimal form, 
or a range of IP addresses in decimal form. The `unit` would be set to either 
http://www.wikidata.org/entity/Q11103 or 
http://www.wikidata.org/entity/Q2551624 based on what the input is (the URIs 
should be customizable). The UI would display either a single IP address or a 
CIDR range. The #wikidata-query-service 
<https://phabricator.wikimedia.org/tag/wikidata-query-service/> would allow 
querying the field in decimal form, or perhaps a `FILTER` can be created in the 
future to convert an IP address to decimal form.
  
  **Work Arounds**
  
  1. Duplicate the data in a Wikidata qualifier (the original proposal) or 
index the data in an external database. This is problematic though, as that 
database would not be part of Wikimedia production and therefore cannot be 
accessed from another wiki directly. It also becomes problematic to filter 
based on other properties (as you would do with the #wikidata-query-service 
<https://phabricator.wikimedia.org/tag/wikidata-query-service/>).
  2. Convert the existing fields to a standard `quantity` field. This solution 
does solve the problem, but creates a user experience (UX) problem as editors 
will need to properly convert an IP range to decimal format. For instance 
`10.0.0.1/24` would need to be entered as `167772287.5±127.5`.

TASK DETAIL
  https://phabricator.wikimedia.org/T235389

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: dbarratt
Cc: Niharika, Aklapper, dbarratt, darthmon_wmde, DannyS712, Nandana, Lahi, 
Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, 
Wikidata-bugs, aude, Mbch331
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to