diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index 9bf17dd817..e418115a61 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -216,10 +216,10 @@ define('REFERER_VALIDATE_HOST', 1); define('REFERER_VALIDATE_PATH', 2); // phpbb_chmod() permissions -@define('CHMOD_ALL', 7); -@define('CHMOD_READ', 4); -@define('CHMOD_WRITE', 2); -@define('CHMOD_EXECUTE', 1); +@define('CHMOD_ALL', 7); // @deprecated 3.2.10 +@define('CHMOD_READ', 4); // @deprecated 3.2.10 +@define('CHMOD_WRITE', 2); // @deprecated 3.2.10 +@define('CHMOD_EXECUTE', 1); // @deprecated 3.2.10 // Captcha code length define('CAPTCHA_MIN_CHARS', 4); diff --git a/phpBB/includes/functions_compress.php b/phpBB/includes/functions_compress.php index 56d64d37fb..437b833eaa 100644 --- a/phpBB/includes/functions_compress.php +++ b/phpBB/includes/functions_compress.php @@ -296,7 +296,7 @@ class compress_zip extends compress try { - $this->filesystem->phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE); + $this->filesystem->phpbb_chmod($str, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { @@ -333,7 +333,7 @@ class compress_zip extends compress try { - $this->filesystem->phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE); + $this->filesystem->phpbb_chmod($str, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { @@ -636,7 +636,7 @@ class compress_tar extends compress try { - $this->filesystem->phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE); + $this->filesystem->phpbb_chmod($str, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { @@ -671,7 +671,7 @@ class compress_tar extends compress try { - $this->filesystem->phpbb_chmod($str, CHMOD_READ | CHMOD_WRITE); + $this->filesystem->phpbb_chmod($str, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { @@ -688,7 +688,7 @@ class compress_tar extends compress try { - $this->filesystem->phpbb_chmod($target_filename, CHMOD_READ); + $this->filesystem->phpbb_chmod($target_filename, \phpbb\filesystem\filesystem_interface::CHMOD_READ); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { diff --git a/phpBB/includes/functions_messenger.php b/phpBB/includes/functions_messenger.php index 3e7a1c5253..0413c4f2fe 100644 --- a/phpBB/includes/functions_messenger.php +++ b/phpBB/includes/functions_messenger.php @@ -1011,7 +1011,7 @@ class queue try { - $this->filesystem->phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE); + $this->filesystem->phpbb_chmod($this->cache_file, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { @@ -1065,7 +1065,7 @@ class queue try { - $this->filesystem->phpbb_chmod($this->cache_file, CHMOD_READ | CHMOD_WRITE); + $this->filesystem->phpbb_chmod($this->cache_file, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index 034cbd1c51..544ca49c4b 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -683,7 +683,7 @@ function create_thumbnail($source, $destination, $mimetype) try { - $phpbb_filesystem->phpbb_chmod($destination, CHMOD_READ | CHMOD_WRITE); + $phpbb_filesystem->phpbb_chmod($destination, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { diff --git a/phpBB/phpbb/cache/driver/file.php b/phpBB/phpbb/cache/driver/file.php index de6f444251..36150d0589 100644 --- a/phpBB/phpbb/cache/driver/file.php +++ b/phpBB/phpbb/cache/driver/file.php @@ -581,7 +581,7 @@ class file extends \phpbb\cache\driver\base try { - $this->filesystem->phpbb_chmod($file, CHMOD_READ | CHMOD_WRITE); + $this->filesystem->phpbb_chmod($file, \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE); } catch (\phpbb\filesystem\exception\filesystem_exception $e) { diff --git a/phpBB/phpbb/files/filespec.php b/phpBB/phpbb/files/filespec.php index 1e6771a3a4..d6d753024b 100644 --- a/phpBB/phpbb/files/filespec.php +++ b/phpBB/phpbb/files/filespec.php @@ -408,7 +408,7 @@ class filespec return false; } - $chmod = ($chmod === false) ? CHMOD_READ | CHMOD_WRITE : $chmod; + $chmod = ($chmod === false) ? \phpbb\filesystem\filesystem_interface::CHMOD_READ | \phpbb\filesystem\filesystem_interface::CHMOD_WRITE : $chmod; // We need to trust the admin in specifying valid upload directories and an attacker not being able to overwrite it... $this->destination_path = $this->phpbb_root_path . $destination;