Page MenuHomePhabricator

Unexpected error "This SVG file contains an illegal namespace" for xmlns:rdfs attribute value
Closed, ResolvedPublic

Description

When attempting to upload the file at https://www.w3.org/Icons/SW/sw-horz-v.svg it is rejected with the following error

This SVG file contains an illegal namespace "http://www.w3.org/2000/01/rdf-schema#".

Source code:

<?xml version='1.0' encoding='iso-8859-1'?>
<svg xmlns='http://www.w3.org/2000/svg' xml:space='preserve' version="1.2" baseProfile="tiny"
overflow='visible' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 353.388 108.396' xmlns:dc='http://purl.org/dc/elements/1.1/'>
  <title property="dc:title">Semantic Web cube symbol with text</title>
  <desc property="dc:description">..</desc>
  <metadata>
	<rdf:RDF 
		xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' 
		xmlns:rdfs='http://www.w3.org/2000/01/rdf-schema#'
		xmlns:cc='http://creativecommons.org/ns#'

Looks like it shouldn't be looking at this attribute for anything.

See also:
T144827: Files created in Adobe Illustrator and edited in Inkscape rejected with 'uploadscriptednamespace'

Details

Related Gerrit Patches:

Event Timeline

Krinkle created this task.Dec 15 2016, 4:40 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 15 2016, 4:40 AM

I suppose we need to whitelist it (UploadBase::checkSvgScriptCallback).

MarkTraceur triaged this task as Medium priority.Dec 22 2016, 5:30 PM
MarkTraceur moved this task from Untriaged to Triaged on the Multimedia board.

Change 333001 had a related patch set uploaded (by Bartosz Dziewoński):
UploadBase: Allow RDF Schema namespace in SVG files

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

Thanks. I see that http://creativecommons.org/ns# and http://www.w3.org/1999/02/22-rdf-syntax-ns# were already whitelisted. yay :)

Change 333001 merged by jenkins-bot:
UploadBase: Allow RDF Schema namespace in SVG files

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

matmarex closed this task as Resolved.Jan 26 2017, 12:11 PM
matmarex claimed this task.
matmarex removed a project: Patch-For-Review.