New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mime type fix for php versions under 5.3 (Trac #4734) #4734
Comments
trac user mrclay wrote on 42551427-12-12 Hmm, comments on both finfo_file and mime_content_type seem to indicate problems with both. Can we decide on a small number of problematic extensions? Should we only try the manual lookup if certain values are returned? |
Milestone changed to |
cash wrote on 42551454-04-12 This is a very hard problem. It is affected by browser and server configuration. If you fallback on file extensions, you risk someone uploading something nasty and having it be misrepresented by your site. MP3 files are especially difficult because MP3 is a stream rather than file format. There is no header so no magic code to go off of. I'd like to see the appropriate hooks in Elgg 1.9 so that sites can customize their mime type detection plus do virus checking. |
ewinslow wrote on 42551751-05-24 I'd like to avoid doing anything just to accommodate PHP 5.2 since we're going to drop support soon. Cash's reason are much more compelling to me. |
Milestone changed to |
cash wrote on 42939730-05-24 Assigning to 1.9 where we can add the appropriate hooks. |
Milestone changed to |
Original ticket http://trac.elgg.org/ticket/4734 on 42551348-02-02 by trac user rjcalifornia, assigned to unknown.
Elgg version: 1.8
Mime type is not detected if php version is under 5.3
This affects MP3, doc, docx, pptx, and other special documents.
Ticket comes from this:
http://community.elgg.org/discussion/view/1032677/a-simple-mp3-mime-type-fix-for-php-versions-under-53
However I realized that it happens to other type of documents as well. I tested under 1.8.x version with under php 5.3 and it is the same
The text was updated successfully, but these errors were encountered: