Page MenuHomePhabricator

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

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.

Related Objects

Event Timeline

thiemowmde raised the priority of this task from to Needs Triage.
thiemowmde updated the task description. (Show Details)

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 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

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