Implemented the password-reset redirect _properly_ instead of the hackish direct header() call in sessions.php
--- a/includes/sessions.php Tue Apr 08 20:29:18 2008 -0400
+++ b/includes/sessions.php Tue Apr 08 20:30:05 2008 -0400
@@ -956,9 +956,11 @@
eval($cmd);
}
- header('Location: ' . makeUrlComplete('Special', 'PasswordReset/stage2/' . $row['user_id'] . '/' . $row['temp_password']) );
-
- exit;
+ return array(
+ 'success' => false,
+ 'error' => 'valid_reset',
+ 'redirect_url' => makeUrlComplete('Special', 'PasswordReset/stage2/' . $row['user_id'] . '/' . $row['temp_password'])
+ );
}
}
--- a/plugins/SpecialUserFuncs.php Tue Apr 08 20:29:18 2008 -0400
+++ b/plugins/SpecialUserFuncs.php Tue Apr 08 20:30:05 2008 -0400
@@ -542,6 +542,14 @@
}
else
{
+ if ( $result['error'] === 'valid_reset' )
+ {
+ header('HTTP/1.1 302 Temporary Redirect');
+ header('Location: ' . $result['redirect_url']);
+
+ $db->close();
+ exit();
+ }
$GLOBALS['__login_status'] = $result;
}
}