]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix validation of allowed personal backend
authorVincent Petry <pvince81@owncloud.com>
Tue, 18 Mar 2014 16:54:14 +0000 (17:54 +0100)
committerVincent Petry <pvince81@owncloud.com>
Tue, 18 Mar 2014 16:54:14 +0000 (17:54 +0100)
apps/files_external/lib/config.php

index 2767076eefa6c605cdd5f62a591efe20d7167382..3d8847c008e928a7d22c934e2dc80658ebede35d 100755 (executable)
@@ -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, '/');