Fix validation of allowed personal backend

This commit is contained in:
Vincent Petry 2014-03-18 17:54:14 +01:00
parent d744e2c176
commit 8ababef4cd
1 changed files with 1 additions and 1 deletions

View File

@ -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, '/');