Skip to content

Commit

Permalink
Make permission denied redirects host relative.
Browse files Browse the repository at this point in the history
This helps fix infinite redirect loops when HTTP_X_FORWARDED_HOST is
set, and fixes redirects back to external domains on authentication
errors.

Fixes #3207
  • Loading branch information
markstory committed Sep 14, 2012
1 parent d33f676 commit 0282194
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Controller/Component/AuthComponent.php
Expand Up @@ -332,7 +332,7 @@ public function startup(Controller $controller) {
if (!empty($this->loginRedirect)) {
$default = $this->loginRedirect;
}
$controller->redirect($controller->referer($default), null, true);
$controller->redirect($controller->referer($default, true), null, true);
return false;
}

Expand Down

0 comments on commit 0282194

Please sign in to comment.