Zend Framework

Zend_File_Transfer_Adapter_Abstract setDestination should check if the directory is writable

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.7.0
  • Fix Version/s: 1.7.2
  • Component/s: Zend_File_Transfer
  • Labels:
    None

Description

this can be done by replacing is_dir by is_writable on line 948

public function setDestination($destination, $files = null)
    {
        //echo "<br>setDestination()<br>";
        
        $orig = $files;
        $destination = rtrim($destination, "/\\");
        if (!is_writable($destination)) {
            require_once 'Zend/File/Transfer/Exception.php';
            throw new Zend_File_Transfer_Exception('The given destination is no directory or does not exist');
        }

Activity

Hide
Thomas Weidner added a comment -

This code allows filenames to be set as directory which is a absolut no-go.

Show
Thomas Weidner added a comment - This code allows filenames to be set as directory which is a absolut no-go.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: