Last modified: 2011-06-24 17:03:44 UTC
Rolling this out of bug 11871, which was asking for _support_ for JPEG 2000 images. Since they're not widely supported by browsers and they're a lossy format without a clear benefit to use I'm WONTFIXing that for now, but the upload bug that makes it possible to mistakenly upload them remains. http://commons.wikimedia.org/wiki/Image:VIC_2_SECTION_%28Converted%29-1.jpg is an example of a file that was first uploaded as JPEG 2000 (the current version was correctly converted to regular JPEG). http://test.wikipedia.org/wiki/File:A_JPEG_2000_file.jpg is an example mentioned also on the previous bug which I reuploaded to test to confirm the bug is still present. File file type is being detected as image/jp2, but this shouldn't make it past upload since it shouldn't match '.jpg' file extension...
Probably a more general bug, for example [[hu:File:China.ogg]] is an mp3 file with .ogg extension.
Created attachment 6123 [details] proposed patch (In reply to comment #0) > File file type is being detected as image/jp2, but this shouldn't make it past > upload since it shouldn't match '.jpg' file extension... > I think this is because there is no mime type entry for jpeg2000 format in mime.types file. I made a patch anyway. (In reply to comment #1) > Probably a more general bug, for example [[hu:File:China.ogg]] is an mp3 file > with .ogg extension. > IMHO, this is because 'audio/mp3' is the main mime type in mime.info and we use 'audio/mpeg' in mime.types instead of it, so MimeMagic::isMatchingExtension() returns NULL (which means continue) instead of false. It only needs a switch in one of the files.
That should mean you can never upload those files at all, if they're unrecognized they can't match the known extension type...
Added the entries to mime.types and mime.info in r88086.