1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/17189] Check folder permissions before writing

PHPBB3-17189
This commit is contained in:
Derky
2023-09-23 16:38:32 +02:00
parent e1052bd168
commit 3b622bc005
3 changed files with 5 additions and 5 deletions

View File

@@ -37,9 +37,9 @@ class file extends \phpbb\cache\driver\base
$this->cache_dir = !is_null($cache_dir) ? $cache_dir : $phpbb_container->getParameter('core.cache_dir');
$this->filesystem = new \phpbb\filesystem\filesystem();
if (!is_dir($this->cache_dir))
if ($this->filesystem->is_writable($this->cache_dir . '/../') && !is_dir($this->cache_dir))
{
@mkdir($this->cache_dir, 0777, true);
mkdir($this->cache_dir, 0777, true);
}
}