More file type checks...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 6 Feb 2008 01:23:12 +0000 (01:23 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 6 Feb 2008 01:23:12 +0000 (01:23 +0000)
commitfee0f038b8d8c9cd14da7de772116388b1ada59e
tree2aff19dd94437597c7057acc3f276bdef2a1fcb8
parent7fb4d441c945b7b7c36cf025bca7324615677ec3
More file type checks...
* Switch XML type detection/validity check from dipping for XML processing instructions, doctypes, or subtags to just trying to parse it and checking the root element's name and namespace. This lets us properly handle SVG files which specify a namespace but no doctype, as well as rejecting files that aren't well-formed. (See http://meta.wikimedia.org/wiki/SVG_validity_checks for some samples of bad files I encountered.) Non-XML files will abort parsing pretty quickly, so this shouldn't be a big burden on other types that didn't hit a magic check.
* Fix Unicode unix script checks (er.... is that even right? :D), remove the iconv dependency
includes/AutoLoader.php
includes/MimeMagic.php
includes/XmlTypeCheck.php [new file with mode: 0644]