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 11, 2010
1 parent 27e4f99 commit aa16940
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 @@ -146,6 +146,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));
}
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 aa16940

Please sign in to comment.