Skip to content

Commit

Permalink
fix: backchannel logout endpoint should only return 200 or 400
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Oct 8, 2024
1 parent 7e80252 commit 9b5d6c6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,6 @@ public function singleLogoutService() {
*
* @PublicPage
* @NoCSRFRequired
* @BruteForceProtection(action=userOidcBackchannelLogout)
*
* @param string $providerIdentifier
* @param string $logout_token
Expand Down Expand Up @@ -788,23 +787,19 @@ public function backChannelLogout(string $providerIdentifier, string $logout_tok
* @param string $error
* @param string $description
* @param array $throttleMetadata
* @param bool|null $throttle
* @return JSONResponse
*/
private function getBackchannelLogoutErrorResponse(string $error, string $description,
array $throttleMetadata = [], ?bool $throttle = null): JSONResponse {
private function getBackchannelLogoutErrorResponse(
string $error, string $description, array $throttleMetadata = [],
): JSONResponse {
$this->logger->debug('Backchannel logout error. ' . $error . ' ; ' . $description);
$response = new JSONResponse(
return new JSONResponse(
[
'error' => $error,
'error_description' => $description,
],
Http::STATUS_BAD_REQUEST,
);
if (($throttle === null && !$this->isDebugModeEnabled()) || $throttle) {
$response->throttle($throttleMetadata);
}
return $response;
}

private function toCodeChallenge(string $data): string {
Expand Down

0 comments on commit 9b5d6c6

Please sign in to comment.