mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Dont allow opening writable streams on a read only dav mount
This commit is contained in:
parent
81ecbbb061
commit
d24c0f4d42
1 changed files with 6 additions and 0 deletions
|
|
@ -209,8 +209,14 @@ class DAV extends \OC\Files\Storage\Common {
|
|||
$ext = '';
|
||||
}
|
||||
if ($this->file_exists($path)) {
|
||||
if (!$this->isUpdatable($path)) {
|
||||
return false;
|
||||
}
|
||||
$tmpFile = $this->getCachedFile($path);
|
||||
} else {
|
||||
if (!$this->isCreatable(dirname($path))) {
|
||||
return false;
|
||||
}
|
||||
$tmpFile = \OCP\Files::tmpFile($ext);
|
||||
}
|
||||
\OC\Files\Stream\Close::registerCallback($tmpFile, array($this, 'writeBack'));
|
||||
|
|
|
|||
Loading…
Reference in a new issue