Merge pull request #36155 from nextcloud/backport/36115/stable25

[stable25] Catch Exceptions when loading storage data of users
This commit is contained in:
Vincent Petry 2023-01-18 14:13:59 +01:00 committed by GitHub
commit e056dd8ba9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -267,6 +267,18 @@ abstract class AUserData extends OCSController {
self::USER_FIELD_QUOTA => $quota !== false ? $quota : 'none',
'used' => 0
];
} catch (\Exception $e) {
\OC::$server->get(\Psr\Log\LoggerInterface::class)->error(
"Could not load storage info for {user}",
[
'app' => 'provisioning_api',
'user' => $userId,
'exception' => $e,
]
);
/* In case the Exception left things in a bad state */
\OC_Util::tearDownFS();
return [];
}
return $data;
}