Needs review
Project:
Embedded Media Field
Version:
6.x-2.x-dev
Component:
Embedded Media Thumbnail
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Dec 2009 at 17:02 UTC
Updated:
21 Mar 2012 at 16:12 UTC
Jump to comment: Most recent file
Comments
Comment #1
enkara commentedThank you. Why isn't this solved in the stable release?
Comment #2
aaron commentedbecause the status hid this patch, so no one was alerted to review it. reviews are welcome, of course.
Comment #3
aaron commentedI had to modify it so we maintain the security checks for .php, etc. thanks @werfu!
Comment #5
markus_petrux commentedSorry to re-open, but we're using 6.x-2.x-dev, and PHP 5.3, and this issue still exits.
The problem is mimedetect cannot be invoked until the file has been stores locally. Otherwise, it will fail because it uses realpath(), and that will return FALSE (in PHP 5.3) if the file does not exist.
Attached patch moves the mime detection _after_ the file has been saved, but it is only done if security check above has not assigned a mime type already.
Patch is against 6.x-2.x, but it may probably be applied to the other branches as well, I think.
Thanks!
Comment #6
markus_petrux commentedOops! I made a mistake setting the issue status.