diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2014-02-22 08:10:31 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2014-02-22 08:10:31 +0100 |
commit | 11ca01403408413cbbe48c8d78c41802998868b7 (patch) | |
tree | 06b0bd6162b311f5427c5721b1c10713ae206999 /apps/files_external/lib | |
parent | c9ab11a9bd191fd3b8bb6360be245cb5af52027c (diff) | |
parent | f1475671aba59e33442ca5f4121e49782eabe974 (diff) | |
download | nextcloud-server-11ca01403408413cbbe48c8d78c41802998868b7.tar.gz nextcloud-server-11ca01403408413cbbe48c8d78c41802998868b7.zip |
Merge pull request #7305 from owncloud/extstorage-configclass
Added extra checks for ext storage class
Diffstat (limited to 'apps/files_external/lib')
-rwxr-xr-x | apps/files_external/lib/config.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index b2109e5eacd..9a8b95c14c9 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -277,15 +277,21 @@ class OC_Mount_Config { $mountType, $applicable, $isPersonal = false) { + $backends = self::getBackends(); $mountPoint = OC\Files\Filesystem::normalizePath($mountPoint); if ($mountPoint === '' || $mountPoint === '/' || $mountPoint == '/Shared') { // can't mount at root or "Shared" folder return false; } + + if (!isset($backends[$class])) { + // invalid backend + return false; + } if ($isPersonal) { // Verify that the mount point applies for the current user // Prevent non-admin users from mounting local storage - if ($applicable != OCP\User::getUser() || $class == '\OC\Files\Storage\Local') { + if ($applicable !== OCP\User::getUser() || strtolower($class) === '\oc\files\storage\local') { return false; } $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/'); |