]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Cache handler needs to support _ in views
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 3 Dec 2010 17:21:09 +0000 (17:21 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Fri, 3 Dec 2010 17:21:09 +0000 (17:21 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7520 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/handlers/cache_handler.php

index d08863a0079c95e89298e0fdae9d05da9e1336d6..557b37835fde668512d21bcad84b58454111c67c 100644 (file)
@@ -40,8 +40,8 @@ $dataroot = $row->value;
 
 
 $dirty_request = $_GET['request'];
-// only alphanumeric characters plus / and . and no '..'
-$filter = array("options" => array("regexp" => "/^(\.?[a-zA-Z0-9\/]+)+$/"));
+// only alphanumeric characters plus /, ., and _ and no '..'
+$filter = array("options" => array("regexp" => "/^(\.?[_a-zA-Z0-9\/]+)+$/"));
 $request = filter_var($dirty_request, FILTER_VALIDATE_REGEXP, $filter);
 if (!$request) {
        echo 'Cache error: bad request';