From 0ff688f6fad24a5fa5e7cab6ee36f7a792d82209 Mon Sep 17 00:00:00 2001 From: Daniel Maya Date: Thu, 14 Jul 2022 16:50:26 +0200 Subject: [PATCH] #8889 Fixed url location --- pandora_console/mobile/index.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pandora_console/mobile/index.php b/pandora_console/mobile/index.php index fc792e0a17..dc79e07c04 100644 --- a/pandora_console/mobile/index.php +++ b/pandora_console/mobile/index.php @@ -193,15 +193,23 @@ switch ($action) { if ($user->isWaitingDoubleAuth()) { if ($user->validateDoubleAuthCode()) { - // Logged. Refresh the page - header('Location: .'); + $url = ui_get_full_url(''); + $url = str_replace("\n", '', $url); + $url = str_replace('?action=logout', '', $url); + + // Logged. Refresh the page. + header('Location: '.$url); return; } else { $user->showDoubleAuthPage(); } } else { - // Logged. Refresh the page - header('Location: .'); + $url = ui_get_full_url(''); + $url = str_replace("\n", '', $url); + $url = str_replace('?action=logout', '', $url); + + // Logged. Refresh the page. + header('Location: '.$url); return; } } else {