cvs: pearweb /public_html search.php
| From: | Martin Jansen | Date: | Thu, 14 Jul 2005 20:54:32 +0000 |
| Subject: | cvs: pearweb /public_html search.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-33050@lists.php.net to get a copy of this message | ||
mj Thu Jul 14 16:54:32 2005 EDT
Modified files:
/pearweb/public_html search.php
Log:
* _GET['in'] is exposed to the user in a hidden field, thus we need to make
sure that it is sanitized.
http://cvs.php.net/diff.php/pearweb/public_html/search.php?r1=1.17&r2=1.18&ty=u
Index: pearweb/public_html/search.php
diff -u pearweb/public_html/search.php:1.17 pearweb/public_html/search.php:1.18
--- pearweb/public_html/search.php:1.17 Thu Jul 14 16:45:48 2005
+++ pearweb/public_html/search.php Thu Jul 14 16:54:32 2005
@@ -15,13 +15,13 @@
+----------------------------------------------------------------------+
| Authors: Martin Jansen <mj@php.net> |
+----------------------------------------------------------------------+
- $Id: search.php,v 1.17 2005/07/14 20:45:48 mj Exp $
+ $Id: search.php,v 1.18 2005/07/14 20:54:32 mj Exp $
*/
require_once "Damblan/Search.php";
$term = (isset($_GET['q']) ?
trim(htmlspecialchars(strip_tags(urldecode($_GET['q'])))) : "");
-$in = (isset($_GET['in']) ? $_GET['in'] : "packages");
+$in = (isset($_GET['in']) ? htmlspecialchars(strip_tags($_GET['in'])) :
"packages");
$search =& Damblan_Search::factory($in, $dbh);
$search->search($term);