Skip to content

Commit fc25556

Browse files
CarlSchwanbackportbot[bot]
authored andcommitted
fix: Return a logout URL even when SAML SLO is not configured
Signed-off-by: Carl Schwan <carlschwan@kde.org>
1 parent 55ae3eb commit fc25556

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

core/AppInfo/Application.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,5 +99,4 @@ public function register(IRegistrationContext $context): void {
9999
public function boot(IBootContext $context): void {
100100
// ...
101101
}
102-
103102
}

lib/private/legacy/OC_User.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ public static function isIncognitoMode(): bool {
277277

278278
/**
279279
* Returns the current logout URL valid for the currently logged-in user
280+
* @return non-empty-string
280281
*/
281282
public static function getLogoutUrl(IURLGenerator $urlGenerator): string {
282283
$backend = self::findFirstActiveUsedBackend();
@@ -288,7 +289,10 @@ public static function getLogoutUrl(IURLGenerator $urlGenerator): string {
288289
if ($user instanceof IUser) {
289290
$backend = $user->getBackend();
290291
if ($backend instanceof ICustomLogout) {
291-
return $backend->getLogoutUrl();
292+
$logoutUrl = $backend->getLogoutUrl();
293+
if ($logoutUrl !== '') {
294+
return $logoutUrl;
295+
}
292296
}
293297
}
294298

0 commit comments

Comments
 (0)