Skip to content

Commit

Permalink
Prevent objectstore being set from client side
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin McCorkell committed Aug 25, 2015
1 parent 3b3ce91 commit b05e178
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/files_external/lib/config.php
Expand Up @@ -489,6 +489,11 @@ public static function addMountPoint($mountPoint,
return false;
}

if (isset($classOptions['objectstore'])) {
// objectstore cannot be set by client side
return false;
}

if (!isset($backends[$class])) {
// invalid backend
return false;
Expand Down Expand Up @@ -875,6 +880,13 @@ private static function mergeMountPoints($data, $mountPoint, $mountType) {
$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 {
Expand Down

0 comments on commit b05e178

Please sign in to comment.