Skip to content
Snippets Groups Projects
Commit d24c0f4d authored by Robin Appelman's avatar Robin Appelman
Browse files

Dont allow opening writable streams on a read only dav mount

parent 81ecbbb0
No related branches found
No related tags found
No related merge requests found
......@@ -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'));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment