summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2015-08-29 10:11:39 +0200
committerLukas Reschke <lukas@owncloud.com>2015-08-29 10:11:39 +0200
commitfaa62d17993b9467f0041cbca2cafccdcb243385 (patch)
treeb07d7b175619b32564e75364593704621e83fb7d
parent64652b300081e2f7090b19bb8467bb89ae6b2faa (diff)
parentd14252d9c75f39e8a35faff91127a430e9a3bf37 (diff)
downloadnextcloud-server-faa62d17993b9467f0041cbca2cafccdcb243385.tar.gz
nextcloud-server-faa62d17993b9467f0041cbca2cafccdcb243385.zip
Merge pull request #18393 from owncloud/objectstore-check-class
make sure we actually have an object store
-rw-r--r--apps/files_external/lib/config/configadapter.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/files_external/lib/config/configadapter.php b/apps/files_external/lib/config/configadapter.php
index a15d9e06a5f..a255a7b3d25 100644
--- a/apps/files_external/lib/config/configadapter.php
+++ b/apps/files_external/lib/config/configadapter.php
@@ -74,6 +74,9 @@ class ConfigAdapter implements IMountProvider {
$objectStore = $storage->getBackendOption('objectstore');
if ($objectStore) {
$objectClass = $objectStore['class'];
+ if (!is_subclass_of($objectClass, '\OCP\Files\ObjectStore\IObjectStore')) {
+ throw new \InvalidArgumentException('Invalid object store');
+ }
$storage->setBackendOption('objectstore', new $objectClass($objectStore));
}