Avoid to set an empty redirect url parameter when accessing icinga web 2
This commit is contained in:
parent
d02c078e4a
commit
d882ea11b4
|
@ -315,13 +315,18 @@ class ActionController extends Zend_Controller_Action
|
|||
if ($redirect !== null) {
|
||||
$login->setParam('redirect', '__SELF__');
|
||||
}
|
||||
|
||||
$this->_response->setHttpResponseCode(403);
|
||||
} elseif ($redirect !== null) {
|
||||
if (! $redirect instanceof Url) {
|
||||
$redirect = Url::fromPath($redirect);
|
||||
}
|
||||
$login->setParam('redirect', $redirect->getRelativeUrl());
|
||||
|
||||
if (($relativeUrl = $redirect->getRelativeUrl())) {
|
||||
$login->setParam('redirect', $relativeUrl);
|
||||
}
|
||||
}
|
||||
|
||||
$this->rerenderLayout()->redirectNow($login);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue