Last modified: 2014-02-15 14:05:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35515, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33515 - .odb file recognized as application/acad (first type entry in our list)
.odb file recognized as application/acad (first type entry in our list)
Status: NEW
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.20.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-01-04 17:11 UTC by Antoine "hashar" Musso (WMF)
Modified: 2014-02-15 14:05 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
fresh OpenDocument database (2.44 KB, application/vnd.oasis.opendocument.database)
2012-01-04 17:11 UTC, Antoine "hashar" Musso (WMF)
Details

Description Antoine "hashar" Musso (WMF) 2012-01-04 17:11:27 UTC
Created attachment 9803 [details]
fresh OpenDocument database

When uploading on opendocument database, it is recognized as application/acad type.

finfo does not recognize the type using magic.mime which return application/octet-stream. MediaWiki thus tries to guess the file content according to its extension. With upload stash, the temporary file does not have any file extension (the path is something like 'mwrepo://local/temp/4/46/20120104160114!phpFfHK5z.'), hence the detection gives unknown/unknown and then default to application/acad (the first one in our list).

The attached file is an empty opendocument database file. Analyzing it with File::getPropsFromPath() yield :

Array
(
    [fileExists] => 1
    [mime] => application/vnd.oasis.opendocument.database
    [media_type] => OFFICE
    [metadata] => 
    [sha1] => 5tlzupz0ww3q8w9pkowrdq72g0wnsqa
    [width] => 0
    [height] => 0
    [bits] => 0
    [file-mime] => unknown/unknown
    [minor_mime] => vnd.oasis.opendocument.database
    [major_mime] => application
    [size] => 2498
)

Please note how 'mime' is correct but 'file-mime' is incorrect :-(

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links