mirror of
https://github.com/mrclay/minify.git
synced 2025-08-13 09:34:54 +02:00
Merge branch '2.x' into merge2x
Conflicts: .gitignore HISTORY.txt README.md config.php docs/CookBook.wiki.md docs/CustomSource.wiki.md lib/Minify/CSS/UriRewriter.php min/lib/DooDigestAuth.php min/lib/FirePHP.php min/lib/JSMinPlus.php min/lib/Minify/Controller/Base.php min/lib/Minify/Loader.php min/lib/Minify/Logger.php
This commit is contained in:
@@ -157,16 +157,19 @@ class Minify_Source_Factory {
|
||||
}
|
||||
|
||||
if ($this->options['checkAllowDirs']) {
|
||||
$allowDirs = (array)$this->options['allowDirs'];
|
||||
$inAllowedDir = false;
|
||||
foreach ((array)$this->options['allowDirs'] as $allowDir) {
|
||||
foreach ($allowDirs as $allowDir) {
|
||||
if (strpos($this->getNormalizedPath($spec['filepath']), $this->getNormalizedPath($allowDir)) === 0) {
|
||||
$inAllowedDir = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$inAllowedDir) {
|
||||
throw new Minify_Source_FactoryException("File '{$spec['filepath']}' is outside \$allowDirs."
|
||||
. " If the path is resolved via an alias/symlink, look into the \$min_symlinks option.");
|
||||
$allowDirsStr = implode(';', $allowDirs);
|
||||
throw new Minify_Source_FactoryException("File '{$spec['filepath']}' is outside \$allowDirs "
|
||||
. "($allowDirsStr). If the path is resolved via an alias/symlink, look into the "
|
||||
. "\$min_symlinks option.");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user