[Pkg-owncloud-commits] [owncloud] 16/67: Dont allow opening writable streams on a read only dav mount

David Prévot taffit at moszumanska.debian.org
Fri Jun 27 23:58:12 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit d24c0f4d42f679e9014e419d8d2bd5fe88ab7e42
Author: Robin Appelman <icewind at owncloud.com>
Date:   Fri Jun 20 16:09:38 2014 +0200

    Dont allow opening writable streams on a read only dav mount
---
 apps/files_external/lib/webdav.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/apps/files_external/lib/webdav.php b/apps/files_external/lib/webdav.php
index c532c5e..8536c65 100644
--- a/apps/files_external/lib/webdav.php
+++ b/apps/files_external/lib/webdav.php
@@ -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'));

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list