diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-04-22 11:17:36 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-04-22 14:29:41 +0200 |
commit | 13c01e62cf9cd1d241b447b80fda719fb2df9931 (patch) | |
tree | 434e8b2773684e01442067b94528b6cb9fe14d39 /lib/private/files | |
parent | c26145aab33481dd958277d2b562703a9c2fd90b (diff) | |
download | nextcloud-server-13c01e62cf9cd1d241b447b80fda719fb2df9931.tar.gz nextcloud-server-13c01e62cf9cd1d241b447b80fda719fb2df9931.zip |
Mark $usersSetup only if user was found in initMountPoints
initMountPoints is marking a user as successfully initialized too
early. If the user was not found an NoUserException was thrown, the
second time initMountPoints is called would not rethrow the exception
and happily continue.
This fix makes sure that we consistently throw NoUserException when
initMountPoints is called repeatedly with invalid users.
Diffstat (limited to 'lib/private/files')
-rw-r--r-- | lib/private/files/filesystem.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/private/files/filesystem.php b/lib/private/files/filesystem.php index ec9b537a358..7283c815c97 100644 --- a/lib/private/files/filesystem.php +++ b/lib/private/files/filesystem.php @@ -378,8 +378,6 @@ class Filesystem { if (isset(self::$usersSetup[$user])) { return; } - self::$usersSetup[$user] = true; - $root = \OC_User::getHome($user); $userManager = \OC::$server->getUserManager(); @@ -390,6 +388,8 @@ class Filesystem { throw new \OC\User\NoUserException('Backends provided no user object for ' . $user); } + self::$usersSetup[$user] = true; + $homeStorage = \OC::$server->getConfig()->getSystemValue('objectstore'); if (!empty($homeStorage)) { // sanity checks |