[wp-trac] [WordPress Trac] #11946: Ensure image MIME type matches extension

WordPress Trac noreply at wordpress.org
Tue Jan 28 08:44:55 UTC 2014


#11946: Ensure image MIME type matches extension
---------------------------+-----------------------------
 Reporter:  Viper007Bond   |       Owner:  Viper007Bond
     Type:  defect (bug)   |      Status:  reopened
 Priority:  normal         |   Milestone:  Future Release
Component:  Upload         |     Version:  3.0
 Severity:  minor          |  Resolution:
 Keywords:  needs-refresh  |     Focuses:
---------------------------+-----------------------------

Comment (by Viper007Bond):

 It's better to rename than reject the upload, especially since that's what
 the other upload functions already do. We should also be as helpful to the
 user as possible (they're trying to upload a file, why not let them?). My
 original patch does this: attachment:11946.4.patch

 Additionally as @markoheijnen mentions above, #21292 has a patch on it
 which addresses this ticket. It's based on my patch but uses `extract()`
 (boo!) but ends up accomplishing the same thing. However it also makes
 some more sweeping changes and there doesn't seem to be much traction on
 that ticket.

 Perhaps it'd be better to just implement the changes as originally
 suggested in attachment:11946.4.patch and loop back to #21292 at a later
 point.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/11946#comment:32>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list