Skip to content

Commit 7a1d8e6

Browse files
httotvdijen
andauthored
Fix logout completion for SP (#1780)
* Fix logout completion for SP Reference parameters need to be explicitely marked as such in the arguments array when using call_user_func_array(). Fixes the following exception: SimpleSAML\Error\Exception: Warning - Parameter 1 to SimpleSAML\Auth\Source::completeLogout() expected to be a reference, value given at .../vendor/simplesamlphp/simplesamlphp/src/SimpleSAML/HTTP/RunnableResponse.php:72 Backtrace: 4 .../vendor/simplesamlphp/simplesamlphp/public/_include.php:86 (SimpleSAML_error_handler) 3 [builtin] (call_user_func_array) 2 .../vendor/simplesamlphp/simplesamlphp/src/SimpleSAML/HTTP/RunnableResponse.php:72 (SimpleSAML\HTTP\RunnableResponse::sendContent) 1 .../vendor/symfony/http-foundation/Response.php:394 (Symfony\Component\HttpFoundation\Response::send) 0 .../vendor/simplesamlphp/simplesamlphp/public/module.php:14 (N/A) * Add note in changelog --------- Co-authored-by: Tim van Dijen <tvdijen@gmail.com>
1 parent 829a2cf commit 7a1d8e6

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

docs/simplesamlphp-changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ See the upgrade notes for specific information about upgrading.
1010
Released 2023-03-10
1111

1212
* The language-menu on mobile devices was fixed
13+
* Fix logout completion for SP (#1780)
1314
* The `loginpage_links` functionality for authsources was restored and documented (#1773)
1415
* Several issues regarding the use of the back-button were fixed (#1720)
1516
* Many fixes in documentation

modules/saml/src/Controller/ServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ public function singleLogoutService(string $sourceId): RunnableResponse
516516

517517
$state = $this->authState::loadState($relayState, 'saml:slosent');
518518
$state['saml:sp:LogoutStatus'] = $message->getStatus();
519-
return new RunnableResponse([Auth\Source::class, 'completeLogout'], [$state]);
519+
return new RunnableResponse([Auth\Source::class, 'completeLogout'], [&$state]);
520520
} elseif ($message instanceof LogoutRequest) {
521521
Logger::debug('module/saml2/sp/logout: Request from ' . $idpEntityId);
522522
Logger::stats('saml20-idp-SLO idpinit ' . $spEntityId . ' ' . $idpEntityId);

0 commit comments

Comments
 (0)