* (bug 24230) Added JAR detection. ZIP archives containing a .class file will be...
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 25 Feb 2011 04:51:17 +0000 (04:51 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 25 Feb 2011 04:51:17 +0000 (04:51 +0000)
commit0a21e2de1242a08dda5d6d16cb1913ae7bc6b7ed
tree6899ac14f347976b80eecf5c63c10babd3dc6d68
parent9f3db4baa5a48b63b34328a51b88cc190573a82a
* (bug 24230) Added JAR detection. ZIP archives containing a .class file will be rejected by default. Malformed ZIP archives will be rejected due to the danger of ambiguous parsing on the client side.
* Removed the ZIP subtypes from $wgMimeTypeBlacklist, they no longer need to be there.
* Added ZipDirectoryReader. Added some small ZIP files which are used to test its various error cases. Most were constructed with a hex editor.
* Fixed getStatusArray() to return a consistent type regardless of whether the error message has parameters. This allows error messages with no parameters to work with the Status object conversion code in UploadBase::verifyFile().
21 files changed:
RELEASE-NOTES
includes/AutoLoader.php
includes/DefaultSettings.php
includes/Status.php
includes/ZipDirectoryReader.php [new file with mode: 0644]
includes/upload/UploadBase.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc
tests/phpunit/data/zip/cd-gap.zip [new file with mode: 0644]
tests/phpunit/data/zip/cd-truncated.zip [new file with mode: 0644]
tests/phpunit/data/zip/class-trailing-null.zip [new file with mode: 0644]
tests/phpunit/data/zip/class-trailing-slash.zip [new file with mode: 0644]
tests/phpunit/data/zip/class.zip [new file with mode: 0644]
tests/phpunit/data/zip/empty.zip [new file with mode: 0644]
tests/phpunit/data/zip/looks-like-zip64.zip [new file with mode: 0644]
tests/phpunit/data/zip/nosig.zip [new file with mode: 0644]
tests/phpunit/data/zip/split.zip [new file with mode: 0644]
tests/phpunit/data/zip/trail.zip [new file with mode: 0644]
tests/phpunit/data/zip/wrong-cd-start-disk.zip [new file with mode: 0644]
tests/phpunit/data/zip/wrong-central-entry-sig.zip [new file with mode: 0644]
tests/phpunit/includes/ZipDirectoryReaderTest.php [new file with mode: 0644]