Page MenuHomePhabricator

SPARQL incorrectly changes URI's from http to https
Open, NormalPublic

Description

https://www.wikidata.org/wiki/Special:EntityData/Q1455955.rdf contains "<wdtn:P214 rdf:resource="http://viaf.org/viaf/5853377"/>", but if I ask the SPARQL I get https:

SELECT ?viafwikidata WHERE { wd:Q1455955 wdtn:P214 ?viafwikidata }

https://query.wikidata.org/#SELECT%20%3Fviafwikidata%20WHERE%20%7B%20wd%3AQ1455955%20wdtn%3AP214%20%3Fviafwikidata%20%7D

Returns https://viaf.org/viaf/5853377

https://www.wikidata.org/wiki/Property:P214 has the right formatter URI. We talked about this at https://www.wikidata.org/w/index.php?title=Topic:Uk2brgqgg1al95f1 and this seems to be historic behavior to normalize outgoing links. https://www.w3.org/DesignIssues/Security-NotTheS.html explains why this is wrong and breaks things. See for example https://www.wikidata.org/wiki/Property_talk:P1006/Mismatches for a query that breaks.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 17 2019, 9:22 PM
Base added a subscriber: Base.Mar 17 2019, 10:16 PM
Smalyshev triaged this task as Normal priority.Mar 20 2019, 12:19 AM