Skip to content

Commit

Permalink
Merge pull request #36155 from nextcloud/backport/36115/stable25
Browse files Browse the repository at this point in the history
[stable25] Catch Exceptions when loading storage data of users
  • Loading branch information
PVince81 authored Jan 18, 2023
2 parents 5cde45b + f3d7292 commit e056dd8
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions apps/provisioning_api/lib/Controller/AUserData.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,18 @@ protected function fillStorageInfo(string $userId): array {
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;
}
Expand Down

0 comments on commit e056dd8

Please sign in to comment.