From 4cb8ca186097de43e48c1d99f83f30704313dab3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 28 Aug 2015 20:48:42 +0200 Subject: [PATCH] Check result of storage wrappers --- lib/private/files/storage/storagefactory.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/private/files/storage/storagefactory.php b/lib/private/files/storage/storagefactory.php index 62b393c845..e8df5090f0 100644 --- a/lib/private/files/storage/storagefactory.php +++ b/lib/private/files/storage/storagefactory.php @@ -99,6 +99,9 @@ class StorageFactory implements IStorageFactory { }, $wrappers); foreach ($wrappers as $wrapper) { $storage = $wrapper($mountPoint->getMountPoint(), $storage, $mountPoint); + if (!($storage instanceof \OCP\Files\Storage)) { + throw new \Exception('Invalid result from storage wrapper'); + } } return $storage; }