Skip to content

Commit

Permalink
assign a local $login_request variable in login.php; if there is no a…
Browse files Browse the repository at this point in the history
…dministrator session and this variable does not exist, redirect to the login page.
  • Loading branch information
haraldpdl committed Sep 10, 2009
1 parent c3a8407 commit 8a9dd05
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions catalog/admin/includes/application_top.php
Expand Up @@ -161,6 +161,10 @@
$redirect = true;
}

if (!isset($login_request) || isset($HTTP_GET_VARS['login_request']) || isset($HTTP_POST_VARS['login_request']) || isset($HTTP_COOKIE_VARS['login_request']) || isset($HTTP_SESSION_VARS['login_request']) || isset($HTTP_POST_FILES['login_request']) || isset($HTTP_SERVER_VARS['login_request'])) {
$redirect = true;
}

if ($redirect == true) {
tep_redirect(tep_href_link(FILENAME_LOGIN, (isset($redirect_origin['auth_user']) ? 'action=process' : '')));
}
Expand Down
2 changes: 2 additions & 0 deletions catalog/admin/login.php
Expand Up @@ -10,6 +10,8 @@
Released under the GNU General Public License
*/

$login_request = true;

require('includes/application_top.php');
require('includes/functions/password_funcs.php');

Expand Down

0 comments on commit 8a9dd05

Please sign in to comment.