summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin McCorkell <rmccorkell@owncloud.com>2015-08-25 16:27:50 +0100
committerRobin McCorkell <rmccorkell@owncloud.com>2015-08-25 16:27:50 +0100
commit595381b9bd5676492ff8957de0590982ed1864a4 (patch)
treeada6f6a9381a7fd3bbb7845d72ffed825a1f7acb /apps
parent12d70eb959cff7f5948a5a6c0ccd25ebd99ef125 (diff)
downloadnextcloud-server-595381b9bd5676492ff8957de0590982ed1864a4.tar.gz
nextcloud-server-595381b9bd5676492ff8957de0590982ed1864a4.zip
Prevent objectstore being set from client side
Diffstat (limited to 'apps')
-rw-r--r--apps/files_external/lib/config.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php
index ddfab439879..8eb968e2d4b 100644
--- a/apps/files_external/lib/config.php
+++ b/apps/files_external/lib/config.php
@@ -490,6 +490,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;
@@ -843,6 +848,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 {