[PEAR-BUG] Bug #18694 [Opn->Csd]: Filesystem.php GetDir wrongly encoded filesnames containing single quotes

[email protected]
Newsgroups php.pear.bugs
Message-ID <[email protected]>
Edit report at http://pear.php.net/bugs/bug.php?id=18694&edit=1

 ID:               18694
 Updated by:       [email protected]
 Reported By:      RalfBecker at outdoor-training dot de
 Summary:          Filesystem.php GetDir wrongly encoded filesnames
                    containing single quotes
-Status:           Open
+Status:           Closed
 Type:             Bug
 Package:          HTTP_WebDAV_Server
 Operating System: irrelevant
 Package Version:  1.0.0RC6
 PHP Version:      Irrelevant
-Assigned To:      
+Assigned To:      doconnor
 Roadmap Versions: 
 New Comment:

-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.


Previous Comments:
------------------------------------------------------------------------

[2011-07-29 14:43:09] ralfbecker

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>');
             }
         }

------------------------------------------------------------------------


-- 
Edit this bug report at http://pear.php.net/bugs/bug.php?id=18694&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.