Skip to content

Commit

Permalink
Merge pull request civicrm#8980 from ergonlogic/dev/CRM-19308
Browse files Browse the repository at this point in the history
Fixes CRM-19308: Disallow false-y values for paths purged during cach…
  • Loading branch information
eileenmcnaughton authored Mar 19, 2017
2 parents 04663fe + 4953d2c commit eee0da4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CRM/Utils/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static function createDir($path, $abort = TRUE) {
*/
public static function cleanDir($target, $rmdir = TRUE, $verbose = TRUE) {
static $exceptions = array('.', '..');
if ($target == '' || $target == '/') {
if ($target == '' || $target == '/' || !$target) {
throw new Exception("Overly broad deletion");
}

Expand Down

0 comments on commit eee0da4

Please sign in to comment.