Skip to content

Commit

Permalink
shib redirect frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
rserry committed Oct 9, 2023
1 parent ed094b2 commit 8baf96e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,10 @@ protected function getShibbolethUrl()

$shibbolethUrl .= '%3Fsource=site';

if ($this->getParam('redirect') !== null) {
$shibbolethUrl .= '%26redirect=' . urlencode($this->getParam('redirect'));
}

$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']);
Expand Down
3 changes: 0 additions & 3 deletions module/CommonBundle/Controller/Admin/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,6 @@ private function getShibbolethUrl()

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();
Expand Down
4 changes: 4 additions & 0 deletions module/CudiBundle/Component/Controller/ProfController.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ private function getShibbolethUrl()

$shibbolethUrl .= '?source=prof';

if ($this->getParam('redirect') !== null) {
$shibbolethUrl .= '%26redirect=' . urlencode($this->getParam('redirect'));
}

$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']);
Expand Down
4 changes: 4 additions & 0 deletions module/FormBundle/Component/Controller/FormController.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ private function getShibbolethUrl()

$shibbolethUrl .= '?source=form';

if ($this->getParam('redirect') !== null) {
$shibbolethUrl .= '%26redirect=' . urlencode($this->getParam('redirect'));
}

$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']);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ private function getShibbolethUrl()

$shibbolethUrl .= '?source=logistics';

if ($this->getParam('redirect') !== null) {
$shibbolethUrl .= '%26redirect=' . urlencode($this->getParam('redirect'));
}

$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']);
Expand Down

0 comments on commit 8baf96e

Please sign in to comment.