mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 19:38:26 +00:00
Fixing URL normalization for AuthComponent redirects
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4663 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
88563ebe46
commit
1bf81bbee9
1 changed files with 3 additions and 3 deletions
|
@ -282,7 +282,7 @@ class AuthComponent extends Object {
|
|||
if (!$this->user()) {
|
||||
if (!$this->RequestHandler->isAjax()) {
|
||||
$this->Session->write('Auth.redirect', $url);
|
||||
$controller->redirect('/' . $this->loginAction);
|
||||
$controller->redirect($this->_normalizeURL($this->loginAction));
|
||||
} elseif (!empty($this->ajaxLogin)) {
|
||||
$controller->viewPath = 'elements';
|
||||
$controller->render($this->ajaxLogin, 'ajax');
|
||||
|
@ -533,13 +533,13 @@ class AuthComponent extends Object {
|
|||
$redir = $this->Session->read('Auth.redirect');
|
||||
$this->Session->delete('Auth.redirect');
|
||||
|
||||
if ($this->_normalizeURL('/' . $redir) == $this->_normalizeURL($this->loginAction)) {
|
||||
if ($this->_normalizeURL($redir) == $this->_normalizeURL($this->loginAction)) {
|
||||
$redir = $this->loginRedirect;
|
||||
}
|
||||
} else {
|
||||
$redir = $this->loginRedirect;
|
||||
}
|
||||
return $this->_normalizeURL('/' . $redir);
|
||||
return $this->_normalizeURL($redir);
|
||||
}
|
||||
/**
|
||||
* Validates a user against an abstract object.
|
||||
|
|
Loading…
Reference in a new issue