From 8ababef4cdd8a62b0f2afcecdc1233b84795163d Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Tue, 18 Mar 2014 17:54:14 +0100 Subject: [PATCH] Fix validation of allowed personal backend --- apps/files_external/lib/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_external/lib/config.php b/apps/files_external/lib/config.php index 2767076eef..3d8847c008 100755 --- a/apps/files_external/lib/config.php +++ b/apps/files_external/lib/config.php @@ -321,7 +321,7 @@ class OC_Mount_Config { // Verify that the mount point applies for the current user // Prevent non-admin users from mounting local storage and other disabled backends $allowed_backends = self::getPersonalBackends(); - if ($applicable != OCP\User::getUser() || !in_array($class, $allowed_backends)) { + if ($applicable != OCP\User::getUser() || !isset($allowed_backends[$class])) { return false; } $mountPoint = '/'.$applicable.'/files/'.ltrim($mountPoint, '/');