Normalize allowed paths with a . in them https://www.virtualmin.com/node/60401

This commit is contained in:
Jamie Cameron
2019-01-16 19:38:55 -08:00
parent 0633772bea
commit ffb017565b

View File

@@ -73,7 +73,7 @@ sub get_paths {
$base = '/';
}
}
@allowed_paths = &unique(@allowed_paths);
@allowed_paths = map { &simplify_path($_) } &unique(@allowed_paths);
$path = $in{'path'} || '';
$cwd = &simplify_path($base.$path);