[Pkg-owncloud-commits] [owncloud] 06/11: Prevent objectstore being set from client side

David Prévot taffit at moszumanska.debian.org
Sun Aug 30 00:14:22 UTC 2015


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

taffit pushed a commit to branch master
in repository owncloud.

commit b05e178bbf884b120d1106e6a28f35aa50d6d06f
Author: Robin McCorkell <rmccorkell at owncloud.com>
Date:   Tue Aug 25 16:27:50 2015 +0100

    Prevent objectstore being set from client side
---
 apps/files_external/lib/config.php | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index 717426c..b3ec25b 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -489,6 +489,11 @@ class OC_Mount_Config {
 			return false;
 		}
 
+		if (isset($classOptions['objectstore'])) {
+			// objectstore cannot be set by client side
+			return false;
+		}
+
 		if (!isset($backends[$class])) {
 			// invalid backend
 			return false;
@@ -875,6 +880,13 @@ class OC_Mount_Config {
 					$mountPoint[$applicable][$mountPath]['priority']
 						= $data[$mountType][$applicable][$mountPath]['priority'];
 				}
+				// Persistent objectstore
+				if (isset($data[$mountType][$applicable][$mountPath])
+					&& isset($data[$mountType][$applicable][$mountPath]['objectstore'])
+				) {
+					$mountPoint[$applicable][$mountPath]['objectstore']
+						= $data[$mountType][$applicable][$mountPath]['objectstore'];
+				}
 				$data[$mountType][$applicable]
 					= array_merge($data[$mountType][$applicable], $mountPoint[$applicable]);
 			} else {

-- 
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