SECURITY: Prevent external resources in SVG files
authorcsteipp <csteipp@wikimedia.org>
Wed, 28 May 2014 23:55:40 +0000 (16:55 -0700)
committermglaser <glaser@hallowelt.biz>
Wed, 25 Jun 2014 20:25:45 +0000 (22:25 +0200)
commit7114801e78b7b4cab2b6d7695bdb4af90462bcbe
treef3a0b48a2742c84080332eef2bcbdce455a39b57
parentfc8def89015cc57f7a6353a30527141bc5b2ddbe
SECURITY: Prevent external resources in SVG files

On bug 65724, it was discovered that a user could upload SVG images
with embedded <image> elements that pulled in the resource via http.
This could allow an attacker to track all viewers of an SVG by having
the image embed another image hosted on their own server.

While testing the patch, I also identified 3 more element namespaces
that have been used on commons and seem harmless, so I added those to
the whitelist.

Change-Id: Iaaabc3a60c0ec4e6e426a8680d7a2cef5d469d29
includes/upload/UploadBase.php