Zend Framework

Zend_Validate_file_Extension: Should not be case-sensitive

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.0RC2
  • Fix Version/s: 1.6.0
  • Component/s: Zend_Validate_File
  • Labels:
    None
  • Fix Version Priority:
    Must Have

Description

for example:
jpg != JPG != Jpg

FIX:

Extension.php - addExtension - line 134:
$this->_extension = strtolower(implode(',', $extensions));

Extension.php - isValid - line 163:
if (in_array(strtolower($info['extension']), $extensions)) {

Activity

Hide
Matthew Weier O'Phinney added a comment -

Scheduling for RC3

Show
Matthew Weier O'Phinney added a comment - Scheduling for RC3
Hide
Thomas Weidner added a comment -

This is only true for windows.

In *nix there is a difference if a file is named a.gif or a.GIF... these are two files.
Because this adapter is not designed for HTTP only the solution is not just to lowercase all extensions !!!

Show
Thomas Weidner added a comment - This is only true for windows. In *nix there is a difference if a file is named a.gif or a.GIF... these are two files. Because this adapter is not designed for HTTP only the solution is not just to lowercase all extensions !!!
Hide
Thomas Weidner added a comment -

Behaviour changed with r10985.
Default is case insensitive, can be changed to sensitive by parameter.

Show
Thomas Weidner added a comment - Behaviour changed with r10985. Default is case insensitive, can be changed to sensitive by parameter.
Hide
Wil Sinclair added a comment -

Updating for the 1.6.0 release.

Show
Wil Sinclair added a comment - Updating for the 1.6.0 release.

People

Vote (1)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: