Skip to content

Commit eb6dc94

Browse files
authored
Merge pull request #36188 from nextcloud/backport/36115/stable23
[stable23] Catch Exceptions when loading storage data of users
2 parents 047ba6d + 36e5584 commit eb6dc94

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

apps/provisioning_api/lib/Controller/AUserData.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,18 @@ protected function fillStorageInfo(string $userId): array {
270270
self::USER_FIELD_QUOTA => $quota !== false ? $quota : 'none',
271271
'used' => 0
272272
];
273+
} catch (\Exception $e) {
274+
\OC::$server->get(\Psr\Log\LoggerInterface::class)->error(
275+
"Could not load storage info for {user}",
276+
[
277+
'app' => 'provisioning_api',
278+
'user' => $userId,
279+
'exception' => $e,
280+
]
281+
);
282+
/* In case the Exception left things in a bad state */
283+
\OC_Util::tearDownFS();
284+
return [];
273285
}
274286
return $data;
275287
}

0 commit comments

Comments
 (0)