From b5a730cf9a1a7cc6a2bdebc44ad255eb877bd772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luca=20B=C3=B6sch?= Date: Thu, 4 May 2023 10:47:01 +0200 Subject: [PATCH] MDL-78120 login: handle empty wantsurl on login with alternateloginurl. --- login/index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/login/index.php b/login/index.php index 25312086d8a..151daec1f8f 100644 --- a/login/index.php +++ b/login/index.php @@ -314,7 +314,7 @@ if (!empty($CFG->alternateloginurl)) { $loginurlstr = $loginurl->out(false); - if (strpos($SESSION->wantsurl, $loginurlstr) === 0) { + if ($SESSION->wantsurl != '' && strpos($SESSION->wantsurl, $loginurlstr) === 0) { // We do not want to return to alternate url. $SESSION->wantsurl = null; }