mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Set umask(0077) by default to prevent any access to the _data_ dir
This commit is contained in:
parent
89f0e81194
commit
3945ab1349
2 changed files with 226 additions and 221 deletions
|
|
@ -16,6 +16,7 @@ class CKEditorPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
// Apache AH00037: Symbolic link not allowed or link target not accessible
|
||||
// That's why we clone the source
|
||||
if (!\is_dir($path)/* && !\is_link($path)*/) {
|
||||
$old_mask = umask(0022);
|
||||
// $active = \symlink(__DIR__ . '/src', $path);
|
||||
\mkdir($path, 0755);
|
||||
$iterator = new \RecursiveIteratorIterator(
|
||||
|
|
@ -29,6 +30,7 @@ class CKEditorPlugin extends \RainLoop\Plugins\AbstractPlugin
|
|||
\copy($item, $path . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
|
||||
}
|
||||
}
|
||||
umask($old_mask);
|
||||
}
|
||||
|
||||
if (\is_file("{$path}/ckeditor.js")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue