mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 19:19:21 +03:00
Improve data security
This commit is contained in:
parent
5457427fc1
commit
38049e0eb9
4 changed files with 6 additions and 6 deletions
|
|
@ -93,7 +93,7 @@ class File implements \MailSo\Cache\DriverInterface
|
|||
|
||||
$sFilePath = $this->sCacheFolder.$this->sKeyPrefix.$sKeyPath;
|
||||
$dir = \dirname($sFilePath);
|
||||
if ($bMkDir && !\is_dir($dir) && !\mkdir($dir, 0755, true))
|
||||
if ($bMkDir && !\is_dir($dir) && !\mkdir($dir, 0700, true))
|
||||
{
|
||||
$sFilePath = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class FileStorage implements \RainLoop\Providers\Files\IFiles
|
|||
|
||||
if ($bMkDir && !empty($sFilePath) && !\is_dir(\dirname($sFilePath)))
|
||||
{
|
||||
if (!\mkdir(\dirname($sFilePath), 0755, true))
|
||||
if (!\mkdir(\dirname($sFilePath), 0700, true))
|
||||
{
|
||||
throw new \RainLoop\Exceptions\Exception('Can\'t make storage directory "'.$sFilePath.'"');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ class FileStorage implements \RainLoop\Providers\Storage\IStorage
|
|||
|
||||
if ($bMkDir && !$bForDeleteAction && !empty($sFilePath) && !\is_dir(\dirname($sFilePath)))
|
||||
{
|
||||
if (!\mkdir(\dirname($sFilePath), 0755, true))
|
||||
if (!\mkdir(\dirname($sFilePath), 0700, true))
|
||||
{
|
||||
throw new \RainLoop\Exceptions\Exception('Can\'t make storage directory "'.$sFilePath.'"');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,11 +83,11 @@
|
|||
|
||||
if (!is_dir(APP_DATA_FOLDER_PATH))
|
||||
{
|
||||
mkdir(APP_DATA_FOLDER_PATH, 0755);
|
||||
mkdir(APP_DATA_FOLDER_PATH, 0700);
|
||||
}
|
||||
else
|
||||
{
|
||||
chmod(APP_DATA_FOLDER_PATH, 0755);
|
||||
chmod(APP_DATA_FOLDER_PATH, 0700);
|
||||
}
|
||||
|
||||
$sTest = '';
|
||||
|
|
@ -102,7 +102,7 @@
|
|||
case !is_writable(APP_DATA_FOLDER_PATH):
|
||||
$sTest = 'is_writable';
|
||||
break;
|
||||
case !mkdir($sCheckFolder, 0755):
|
||||
case !mkdir($sCheckFolder, 0700):
|
||||
$sTest = 'mkdir';
|
||||
break;
|
||||
case false === file_put_contents($sCheckFilePath, time()):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue