Commit e817ec52 authored by anarcat's avatar anarcat Committed by anarcat
Browse files

Merge branch 'master' of ceres.koumbit.net:/var/aegir/.drush/provision

parents 9b71d307 2a1c3e8c
...@@ -369,7 +369,9 @@ function _provision_mkdir_recursive($path, $mode) { ...@@ -369,7 +369,9 @@ function _provision_mkdir_recursive($path, $mode) {
*/ */
function _provision_call_recursive($func, $path, $arg) { function _provision_call_recursive($func, $path, $arg) {
$status = 1; $status = 1;
if ($dh = @opendir($path)) { // do not follow symlinks as it could lead to a DOS attack
// consider someone creating a symlink from files/foo to ..: it would create an infinite loop
if ($dh = @opendir($path) && !is_link($path)) {
while (($file = readdir($dh)) !== false) { while (($file = readdir($dh)) !== false) {
if ($file != '.' && $file != '..') { if ($file != '.' && $file != '..') {
$status = _provision_call_recursive($func, $path . "/" . $file, $arg) && $status; $status = _provision_call_recursive($func, $path . "/" . $file, $arg) && $status;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment