diff options
author | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-25 16:27:50 +0100 |
---|---|---|
committer | Robin McCorkell <rmccorkell@owncloud.com> | 2015-08-25 16:27:50 +0100 |
commit | 595381b9bd5676492ff8957de0590982ed1864a4 (patch) | |
tree | ada6f6a9381a7fd3bbb7845d72ffed825a1f7acb /apps | |
parent | 12d70eb959cff7f5948a5a6c0ccd25ebd99ef125 (diff) | |
download | nextcloud-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.php | 12 |
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 { |