Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backchannel logout endpoint should only return 200 or 400 #955

Merged
merged 1 commit into from
Oct 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading