From: Tim Düsterhus Date: Tue, 13 Apr 2021 14:59:42 +0000 (+0200) Subject: Correctly handle a missing .htaccess in the tmp/ folder X-Git-Tag: 5.3.6~5 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6283c8499327c906a3278d29b1cd403ae25d6e1;p=GitHub%2FWoltLab%2FWCF.git Correctly handle a missing .htaccess in the tmp/ folder see be81c8401ba16bd1f84fe95f8ca71c372cf548ec --- diff --git a/wcfsetup/install/files/lib/util/FileUtil.class.php b/wcfsetup/install/files/lib/util/FileUtil.class.php index 405f1c6d2b..d0b83a326a 100644 --- a/wcfsetup/install/files/lib/util/FileUtil.class.php +++ b/wcfsetup/install/files/lib/util/FileUtil.class.php @@ -39,8 +39,6 @@ final class FileUtil { */ public static function getTempFolder() { try { - // This method does not contain any shut up operator by intent. - // Any operation that fails here is fatal. $path = WCF_DIR.'tmp/'; if (is_file($path)) { @@ -64,7 +62,7 @@ final class FileUtil { throw new SystemException("Temporary folder '".$path."' is not writable. Please check the permissions using your favorite ftp program."); } - if (md5_file($path . '/.htaccess') !== '5cc8a02be988615b049f5abecba2f3a0') { + if (@md5_file($path . '/.htaccess') !== '5cc8a02be988615b049f5abecba2f3a0') { file_put_contents($path.'/.htaccess', 'deny from all'); }