diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2013-01-30 04:45:38 +1100 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2013-01-30 04:45:38 +1100 |
| commit | 5661e32b1ce977d4fe98b73f468bdf5695464c56 (patch) | |
| tree | 224089da01fdabd12176a4bad8486eda4b6c0dcc | |
| parent | 45f9b51ad85e087bafaa83ddb3d6a3547cafe315 (diff) | |
Instead of showing $config['error']['malformed'] on corrupt session, just go straight to the login form
| -rw-r--r-- | inc/mod/auth.php | 7 | ||||
| -rw-r--r-- | mod.php | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/inc/mod/auth.php b/inc/mod/auth.php index 8fb01ecb..b3b23553 100644 --- a/inc/mod/auth.php +++ b/inc/mod/auth.php @@ -98,8 +98,10 @@ if (isset($_COOKIE[$config['cookies']['mod']])) { // Should be username:hash:salt $cookie = explode(':', $_COOKIE[$config['cookies']['mod']]); if (count($cookie) != 3) { + // Malformed cookies destroyCookies(); - error($config['error']['malformed']); + // error($config['error']['malformed']); + mod_login(); } $query = prepare("SELECT `id`, `type`, `boards`, `password` FROM `mods` WHERE `username` = :username LIMIT 1"); @@ -111,7 +113,8 @@ if (isset($_COOKIE[$config['cookies']['mod']])) { if ($cookie[1] !== mkhash($cookie[0], $user['password'], $cookie[2])) { // Malformed cookies destroyCookies(); - error($config['error']['malformed']); + // error($config['error']['malformed']); + mod_login(); } $mod = array( @@ -5,8 +5,8 @@ */ require 'inc/functions.php'; -require 'inc/mod/auth.php'; require 'inc/mod/pages.php'; +require 'inc/mod/auth.php'; // Fix for magic quotes if (get_magic_quotes_gpc()) { |
