[Collab-qa-commits] r683 - wnpp

sping-guest at alioth.debian.org sping-guest at alioth.debian.org
Wed Jan 30 09:05:33 UTC 2008


Author: sping-guest
Date: 2008-01-30 09:05:33 +0000 (Wed, 30 Jan 2008)
New Revision: 683

Modified:
   wnpp/index.php5
Log:
Fix XSS vulnerability. Thanks to Kees Cook (kees at debian).

Modified: wnpp/index.php5
===================================================================
--- wnpp/index.php5	2008-01-29 19:37:40 UTC (rev 682)
+++ wnpp/index.php5	2008-01-30 09:05:33 UTC (rev 683)
@@ -83,7 +83,7 @@
         break;
     } 
 }
-$sort_part = "sort=" . urlencode($_GET['sort']);
+$sort_part = "sort=$order_col;" . strtolower($order_dir);
 
 
 
@@ -428,7 +428,7 @@
 echo "        </tr>\n";
 echo "        </table>\n";
 if (!empty($_GET['sort'])) {
-echo "        <input type=\"hidden\" name=\"sort\" value=\"" . $_GET['sort'] . "\">\n";
+echo "        <input type=\"hidden\" name=\"sort\" value=\"" . htmlspecialchars($_GET['sort']) . "\">\n";
 }
 echo "        </form>\n";
 




More information about the Collab-qa-commits mailing list