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'

Event Timeline

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

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 claimed this task.
matmarex removed a project: Patch-For-Review.