Page MenuHomePhabricator

[Story] Disallow wikidata.org URIs to non-Item pages in unit/globe/calendar values
Open, NormalPublic

Description

Certain DataValues use URIs internally, and we are slowly introducing more of these cases:

  • Calendar models in time values.
  • Globes in coordinates.
  • Units in quantities.

In all these cases our current validators allow everything, as long as the URL starts with http or https and doesn't exceed 255 characters. The relevant code can be seen in Wikibase\Repo\ValidatorBuilders.

In all these cases I suggest to:

  • Disallow http://wikidata.org with the "www" missing.
  • Disallow http://www.wikidata.org/wiki/ with "wiki" instead of "entity". Moreover, disallow every wikidata.org URI but canonical /entity/ URIs.
  • Disallow every entity type but Items.

Event Timeline

thiemowmde raised the priority of this task from to Needs Triage.
thiemowmde updated the task description. (Show Details)
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 17 2015, 4:20 PM

Change 219016 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Rework EntityLabelUnitFormatter into ItemLabelUnitFormatter

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

Lydia_Pintscher triaged this task as Normal priority.Jun 26 2015, 11:20 AM
Lydia_Pintscher set Security to None.
Lydia_Pintscher moved this task from ready to go to consider for next sprint on the Wikidata board.
Jonas renamed this task from Disallow wikidata.org URIs to non-Item pages in unit/globe/calendar values to [Story] Disallow wikidata.org URIs to non-Item pages in unit/globe/calendar values.Aug 13 2015, 3:03 PM

Change 219016 abandoned by Thiemo Mättig (WMDE):
Rework EntityLabelUnitFormatter into ItemLabelUnitFormatter

Reason:
Became obsolete with I776a4aa.

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

thiemowmde closed this task as Resolved.Jul 4 2016, 2:19 PM
thiemowmde claimed this task.
thiemowmde reopened this task as Open.Jul 4 2016, 2:21 PM

Sorry, https://gerrit.wikimedia.org/r/218917 was about formatting, but this ticket is about validation, which is not resolved.

thiemowmde removed thiemowmde as the assignee of this task.Sep 4 2018, 12:03 PM
thiemowmde added a project: patch-welcome.