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

Bug #18694 Filesystem.php GetDir wrongly encoded filesnames containing single quotes
Submitted: 2011-07-29 18:43 UTC
From: ralfbecker Assigned: doconnor
Status: Closed Package: HTTP_WebDAV_Server (version 1.0.0RC6)
PHP Version: Irrelevant OS: irrelevant
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 48 - 13 = ?

 
 [2011-07-29 18:43 UTC] ralfbecker (Ralf Becker)
Description: ------------ htmlspecialchars($name) does NOT encode single quotes (') unless ENT_QUOTE is set, which is not in Server/Filesystem.php on line 483, therefore you can not use single quotes in a href. Following patch fixes it: --- Server/Filesystem.php (Revision 35842) +++ Server/Filesystem.php (Arbeitskopie) @@ -484,7 +484,7 @@ $name = htmlspecialchars($filename); printf($format, number_format(filesize($fullpath)), strftime("%Y-%m-%d %H:%M:%S", filemtime($fullpath)), - "<a href='$name'>$name</a>"); + '<a href="'.$name.'">'.$name.'</a>'); } }

Comments

 [2011-07-30 15:21 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Closed -Assigned To: +Assigned To: doconnor
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Thanks Ralf; fixed in r313956.