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 /inc/mod/auth.php | |
| parent | 45f9b51ad85e087bafaa83ddb3d6a3547cafe315 (diff) | |
Instead of showing $config['error']['malformed'] on corrupt session, just go straight to the login form
Diffstat (limited to 'inc/mod/auth.php')
| -rw-r--r-- | inc/mod/auth.php | 7 |
1 files changed, 5 insertions, 2 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( |
