| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
* The later resides in /libs with related files.
* Explose MimeAnalyzer as a service.
* Keep MimeMagic::singleton() as a b/c alias.
* MimeMagic::applyDefaultConfig() will bootstrap the service
with all of the old config, extension hook handler, and
detector command shell-out behavior.
Change-Id: Ie2695a52e7a3bcfda9f7fa83659a9ff31b372bc3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous "application/x-javascript" was non-standard. It was used as
unregistered mime type by various vendors after stakeholders agreed it
shouldn't be text/javascript anymore, but "application/javascript" was
still pending approval. That was settled in 2006 with RFC 4329.
http://www.iana.org/assignments/media-types/media-types.xhtml
https://tools.ietf.org/html/rfc4329
It also previously inconsistently returned "application/x-javascript" or
"text/javascript" depending on whether you call MimeMagic with or without
the flag that asks for "improved" mime magic (in the latter mode, it picks
the first one from the mime-info list as override).
This makes MimeMagic match the behaviour of HHVM-static server, NGINX,
and Apache 2.4; with regards to Content-Type for .js files.
Change-Id: Idfe0a80c60c548fe28283c62ee9803bff7bdb2d6
|
|
|
|
| |
Change-Id: Ib3392b7fcec475c153099a1b92fe195c5eb4b195
|
|
|
|
|
|
|
|
|
|
| |
image/pjpeg is a non-standard mime type for progressive jpegs
that is sometimes used. Not considering this an alias of normal
jpeg images was causing content type validation failures in
gwtoolset.
Bug: T102136
Change-Id: I505f16c4e8e4ee2e2a4675f4f07c4b8c12f9d187
|
|
|
|
|
|
| |
Update to allow upload of application/x-bzip2 .bz2 files.
Change-Id: I84158423de755d45d85b1bc34e49f58f8725f5cd
|
|
|
|
|
|
|
|
| |
The mime type .ico files is detected as image/vnd.microsoft.icon on some PHP
installations. This fixes the issue by aliasing it to image/x-icon.
Bug: 69437
Change-Id: I1fdb4c7058546d6cdd47b1961706ef84a05dd360
|
|
|
|
|
|
| |
Writing MIME as written in Wikipedia and some documentation clean up.
Change-Id: I9dfc36d2bf55d72d9374c4075bd6d45eef0415a4
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
json, csv, and tsv are often detected as text/plain. However that's
not right. This patch causes MediaWiki to look at the file extension
of files detected as text/plain, and if the file extension is
for a "textual" type, use the mime type associated with that extension.
This change also changes the "does mime type match uploaded file
extension" check to use the mime based on the file contents
plus extension, as opposed to just the file contents. Various
documentation suggests this is more appropriate (e.g. line 807
of MimeMagic.php). In my opinion we should use just the file
contents when verifying file is not on blacklist, but use ext
when verifying file type matches extension, and for decided
what handler specific checks to run. Not the detect mime type
with extension doesn't override the detected mime type with
the extension, but only uses the extension if content based
detection is ambigious or not specific enough.
This patch should be reviewed by csteipp before merge for
any potential security implications.
Note: This is partially fixing a regression from 3846d1048766a7,
where previously csv and json files were allowed to be uploaded,
and that change prevented them
Bug: 66036
Bug: 45424
Change-Id: Ib637fe6850a81b26f84dc8c00ab4772f3d3a1f34
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Adding mol, sdf, rxn, rd and rg file types to mime.types and mime.info
map to make them known to MediaWiki by default.
PHP's own module fileinfo module is not capable detecting Chemical
table files. Instead, they are reported as text/plain.
MediaHandlers can be attached by MIME type only. That's why these
changes are required for [[Extension:MolHandler]] to work.
Change-Id: I017507e4a950b3ce4e6576d12217cd42a337bad6
|
|
|
|
|
|
|
|
|
| |
Any format we allow uploading should be in these files.
We detect flac as audio/x-flac, but adding audio/flac
too, to be safe.
Change-Id: I564ff895cd0a6d4c6cd25bb565329b17a6771852
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Its a popular video format, we should recognize its type.
This will also prevent people from uploading mp4's to commons.
Wikipedia claims m4a sometimes used for video content.
RFC 4337 says audio/mp4 is mime type for mp4 with no
video (which is usually what an m4a extension means).
Bug: 52990
Change-Id: I5c24c3e318651241cced5b36d107d3603a289427
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104313
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/104312
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/97030
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/91109
|
|
|
|
|
|
|
| |
adding the relevant mime info to mime.types and mime.info
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/88086
|
|
|
|
|
|
|
| |
accompanied by appropriate sanity checks on upload
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/86161
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/82922
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Patch from Derk-Jan Hartman of which he writes:
I figured adding kml support would be a breeze, but I had not
counted on the brain dead browser that is IE6.
Unfortunately, kml contains the element <heading, which triggers
the protection in detectScript() that protects from uploads that
IE6 might mistake for HTML. It triggers on "<head" not sure if we
can work around this, but Tim will know.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/82436
|
|
|
|
|
|
|
| |
people add dwg to $wgFileExtensions, they can move files.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/82418
|
|
|
|
|
|
|
|
|
| |
support.
Relates to bug 25397
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/75087
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently all webm files are stored as video/webm. It is not possible to detect
wether this file is an audio file without using a full parser. This is why We should
really move mime and mediatype accessors to the MediaHandlers.
Using video/x-matroska for MKV files. There is no official mime for MKV (though the
webm isn't official either, but everyone is already using it apparently).
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/70103
|
|
|
|
|
|
|
|
|
| |
OpenXML files are Open Package Convention files. Internally, we use the custom mime application/x-opc+zip for these files. In the database, we store the 'proper' mime, which we gu
ess from the file extension, or if not supported, application/zip. All OPC files are blacklisted by $wgMimeTypeBlacklist by default, just as other zip files.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/68279
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/66069
|
|
|
|
|
|
|
| |
Derk-Jan Hartman.
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/65816
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/64509
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/33935
|
|
|
|
|
|
|
|
| |
* remove empty lines at end of file
* remove "?>" where still present
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/33276
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/26228
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
thumbnailing, img_metadata, capabilities, etc.
* Deprecated $wgUseImageResize, thumbnailing will be enabled unconditionally.
* Fixed interaction of page parameter to ImagePage with the HTML file cache
* Improved error reporting for image thumbnailing
* Fixed MIME type for SVG files, will be silently changed from image/svg to image/svg+xml after loading from the database.
* Workaround for djvutoxml bug #1704049 (poor performance). Use djvudump instead.
* Fixed odd behaviour in ImagePage on DjVu thumbnailing errors
* Improved error reporting for image thumbnailing
* Added sharpening option for ImageMagick thumbnailing
* Removed Image::selectPage(), added page parameters to getWidth() and getHeight(), deprecated Image::renderThumb() and Image::getThumbnail()
* Changed default contents of img_metadata to empty string instead of a:0:{}
* Moved responsibility for respecting $wgGenerateThumbnailOnParse from the UI to Image.php
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/21411
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/20115
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/20083
|
|
|
|
| |
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/13397
|
|
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/9116
|