ZF-5155: Zend_File_Transfer_Adapter_Abstract setDestination should check if the directory is writable

Issue Type: Improvement Created: 2008-12-04T04:43:09.000+0000 Last Updated: 2008-12-21T05:03:25.000+0000 Status: Resolved Fix version(s): - 1.7.2 (23/Dec/08)

Reporter: Laurent Melmoux (laurent melmoux) Assignee: Thomas Weidner (thomas) Tags: - Zend_File_Transfer

Related issues: Attachments:


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

<pre class="highlight">
public function setDestination($destination, $files = null)
        //echo "<br></br>setDestination()<br></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');


Posted by Thomas Weidner (thomas) on 2008-12-05T12:14:57.000+0000

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

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.