From ed094b21ff0fa7ed12c78783902925bd344f32a4 Mon Sep 17 00:00:00 2001 From: Robbe Serry Date: Mon, 9 Oct 2023 15:30:54 +0000 Subject: [PATCH] shib redirect admin --- module/CommonBundle/Controller/Admin/AuthController.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/CommonBundle/Controller/Admin/AuthController.php b/module/CommonBundle/Controller/Admin/AuthController.php index 3f9e8f85f2..37f752e431 100644 --- a/module/CommonBundle/Controller/Admin/AuthController.php +++ b/module/CommonBundle/Controller/Admin/AuthController.php @@ -166,6 +166,13 @@ private function getShibbolethUrl() $shibbolethUrl .= '?source=admin'; + if ($this->getParam('redirect') !== null) { + $shibbolethUrl .= '%26redirect=' . urlencode($this->getParam('redirect')); + $this->getSentryClient()->logMessage('shiburl: ' . $shibbolethUrl); + }else { + $this->getSentryClient()->logMessage("no redirect param"); + } + $server = $this->getRequest()->getServer(); if (isset($server['X-Forwarded-Host']) && isset($server['REQUEST_URI'])) { $shibbolethUrl .= '%26redirect=' . urlencode('https://' . $server['X-Forwarded-Host'] . $server['REQUEST_URI']);