cvs: phpweb / search.php
| From: | Gabor Hojtsy | Date: | Mon, 06 Jan 2003 10:42:33 +0000 |
| Subject: | cvs: phpweb / search.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-14779@lists.php.net to get a copy of this message | ||
goba Mon Jan 6 05:42:33 2003 EDT
Modified files:
/phpweb search.php
Log:
Properly use those security related checks...
Index: phpweb/search.php
diff -u phpweb/search.php:1.59 phpweb/search.php:1.60
--- phpweb/search.php:1.59 Sat Jan 4 14:32:26 2003
+++ phpweb/search.php Mon Jan 6 05:42:33 2003
@@ -55,12 +55,12 @@
}
// Only allow alphabetical chars in lang (security)
-if (!preg_match("!\\w+!", $lang)) {
+if (!preg_match("!^\\w+$!", $lang)) {
$lang = default_language();
}
// Only allow alphabetical chars in show (security)
-if (isset($show) || !preg_match("!\\w+!", $show)) {
+if (isset($show) && !preg_match("!^\\w+$!", $show)) {
$show = "wholesite";
}