Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.0RC8

Bug #1949 $_prop_encoding not used for $file['path']
Submitted: 2004-07-22 12:37 UTC
From: pear dot php dot net at chsc dot dk Assigned: hholzgra
Status: Closed Package: HTTP_WebDAV_Server
PHP Version: 5.0.0 OS: Linux
Roadmaps: 1.0    
Subscription  


 [2004-07-22 12:37 UTC] pear dot php dot net at chsc dot dk
Description: ------------ Using Microsoft-WebDAV-MiniRedir/5.1.2600 on Windows XP I cannot get a directory listing of a directory that contains files or directories with non-us-ascii characters in their name, when $server->_prop_encoding is different from "utf-8". Instead I get a generic error dialog saying something like "Invalid parameter". If I make the following change to Server.php around line 606, it works for me: - $href = $_SERVER['SCRIPT_NAME'] . $path; + $href = $_SERVER['SCRIPT_NAME'] . $this->_prop_encode($path); Without the change, $path is encoded according to the encoding specified by the user in $server->_prop_encoding. With the change, the non-us-ascii characters are UTF-8-encoded. I don't know whether this is the right way to fix the problem - my understanding of the code is not that big.

Comments

 [2004-10-05 16:20 UTC] pear dot php dot net at chsc dot dk
I looks as if $href should also be encoded using $this->_urlencode(). Otherwise there are problems when a filename contains an ampersand.
 [2005-09-07 08:58 UTC] pear dot php dot net at chsc dot dk
This problem still exists in the latest CVS version. Changing line 635 from $href = $this->_slashify($_SERVER['SCRIPT_NAME']) . $path; to $href = $this->_prop_encode($this->_slashify($_SERVER['SCRIPT_NAME']) . $path); appearently fixes the problem.
 [2005-09-07 09:18 UTC] pear dot php dot net at chsc dot dk
Sorry, that should be $href = $this->_urlencode($this->_prop_encode($this->_slashify($_SERVER['SCRIPT_NAME']) . $path)); in order to also work with e.g. ampersands in filenames.
 [2007-12-03 15:05 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2008-03-29 21:37 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!