Merge pull request #59727 from nextcloud/backport/59721/stable33

[stable33] fix(ocm): Correctly track OCM requests
This commit is contained in:
Joas Schilling 2026-04-20 15:04:31 +02:00 committed by GitHub
commit 895ae90f80
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -62,7 +62,9 @@ class OCMRequestController extends Controller {
$signedRequest = $this->ocmDiscoveryService->getIncomingSignedRequest();
} catch (IncomingRequestException $e) {
$this->logger->warning('incoming ocm request exception', ['exception' => $e]);
return new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
$response = new JSONResponse(['message' => $e->getMessage(), 'validationErrors' => []], Http::STATUS_BAD_REQUEST);
$response->throttle();
return $response;
}
// assuming that ocm request contains a json array