From 0bf7427918182c5c05021d5ff5fed85e8f834f86 Mon Sep 17 00:00:00 2001 From: Jan Kristinus Date: Thu, 22 Aug 2024 16:29:21 +0200 Subject: [PATCH] =?UTF-8?q?Referer=20to=20Logout=20pr=C3=BCft=20ob=20Logou?= =?UTF-8?q?t=20ID=20vorhanden=20ist=20(#489)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/auth/lib/ycom_auth.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/auth/lib/ycom_auth.php b/plugins/auth/lib/ycom_auth.php index 9df448d..38f6da0 100644 --- a/plugins/auth/lib/ycom_auth.php +++ b/plugins/auth/lib/ycom_auth.php @@ -586,7 +586,13 @@ public static function cleanReferer(string $refererURL): string $returnUrl .= '?' . $url['query']; } - $referer_to_logout = strpos($returnUrl, rex_getUrl(rex_config::get('ycom/auth', 'article_id_logout', ''))); + $article_id_logout = rex_config::get('ycom/auth', 'article_id_logout', ''); + if ($article_id_logout > 0) { + $referer_to_logout = strpos($returnUrl, rex_getUrl(rex_config::get('ycom/auth', 'article_id_logout', ''))); + } else { + $referer_to_logout = false; + } + if (false === $referer_to_logout) { } else { $returnUrl = '';