Fix logout loop (testing), #2

Quick and dirty fix.
This commit is contained in:
Eric Lippmann 2015-10-01 10:50:09 +02:00
parent 92b0bfaca8
commit 6affad6895
2 changed files with 4 additions and 3 deletions

View File

@ -73,7 +73,7 @@ class LoginForm extends Form
if ($this->created) {
$redirect = $this->getElement('redirect')->getValue();
}
if (empty($redirect)) {
if (empty($redirect) || strpos($redirect, 'authentication/logout') !== 0) {
$redirect = static::REDIRECT_URL;
}
return Url::fromPath($redirect);

View File

@ -359,7 +359,7 @@
url = parts.shift();
var redirectionUrl = this.addUrlFlag(url, 'renderLayout');
var r = this.loadUrl(redirectionUrl, $('#layout'));
r.addToHistory = false;
r.historyUrl = url;
if (parts.length) {
r.loadNext = parts;
} else if (!! document.location.hash) {
@ -608,7 +608,8 @@
} else {
// Request wasn't for a container, so it's usually the body
// or the full layout. Push request URL to history:
this.icinga.history.pushUrl(req.url);
var url = typeof req.historyUrl !== 'undefined' ? req.historyUrl : req.url;
this.icinga.history.pushUrl(url);
}
}