From afae80e9c5e655a6030b9c76fc66556a9ba96e78 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Sat, 16 Jul 2011 16:35:37 +0200 Subject: [PATCH] Validate is_dir on the given directory --- wcfsetup/install/files/lib/util/DirectoryUtil.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php index f0989b67bd..511d23d49e 100644 --- a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php +++ b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php @@ -125,6 +125,9 @@ class DirectoryUtil { if ($directory === false) { throw new SystemException("Unknown directory '".$tmpDirectory."'"); } + if (!is_dir($directory)) { + throw new SystemException("'".$tmpDirectory."' is no directory"); + } if (!isset(static::$instances[$recursive][$directory])) { static::$instances[$recursive][$directory] = new static($directory, $recursive); -- 2.20.1