Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Make check for .. more specific.
A `..` anywhere in the classname is invalid.

Backport c685f6c to 2.2 as part
of a security release.
  • Loading branch information
markstory committed Jul 18, 2013
1 parent 10a9d36 commit d8a1196
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Cake/Core/App.php
Expand Up @@ -532,6 +532,9 @@ public static function load($className) {
if (!isset(self::$_classMap[$className])) {
return false;
}
if (strpos($className, '..') !== false) {
return false;
}

$parts = explode('.', self::$_classMap[$className], 2);
list($plugin, $package) = count($parts) > 1 ? $parts : array(null, current($parts));
Expand Down

0 comments on commit d8a1196

Please sign in to comment.