Ticket #590 (closed Bug: fixed)
Image library process() sees upper or mixed case extensions as invalid
| Reported by: | rick | Owned by: | - No owner - |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.1.2 |
| Component: | Libraries:Image | Version: | SVN HEAD |
| Keywords: | image file extension case uppercase lowercase | Cc: |
Description
The Image library won't allow mixed or upper case image file extensions when saving. The upload helper, on the other hand, doesn't care about case so there is an inconsistency when using the upload::type() method for validation in combination with uploading images. Here is a possible simple fix for the GD driver:
// line 50 of system/libraries/drivers/Image/GD.php switch (substr($file, strrpos($file, '.') + 1)) // change to switch (strtolower(substr($file, strrpos($file, '.') + 1)))
I haven't looked at the ImageMagick? driver.
Then there is a question of whether mixed case image extensions should be allowed. Maybe the image library could normalize all extensions to lower case.
Change History
Note: See
TracTickets for help on using
tickets.
