Added sanity check to _REQUEST['request'] when redirecting to the login page. Alleviates an issue when securing the default module.

This commit is contained in:
Josh Sherman 2011-05-14 21:38:06 -04:00
parent 2ea8e1957d
commit 5d63e032f5

View file

@ -246,7 +246,7 @@ class Controller extends Object
else
{
// Sets variable for the destination
$_SESSION['__pickles']['login']['destination'] = $_REQUEST['request'];
$_SESSION['__pickles']['login']['destination'] = isset($_REQUEST['request']) ? $_REQUEST['request'] : '/';
// Redirect to login page, potentially configured in the config, else /login
header('Location: /' . (isset($this->config->security['login']) ? $this->config->security['login'] : 'login'));