Disable IP check for password recovery, resolves #376

This commit is contained in:
Calvin Montgomery 2014-06-15 10:58:53 -07:00
parent 81d16b09fa
commit 8c50655ff2
1 changed files with 2 additions and 12 deletions

View File

@ -645,6 +645,8 @@ function handlePasswordReset(req, res) {
* Handles a request for /account/passwordrecover/<hash>
*/
function handlePasswordRecover(req, res) {
logRequest(req);
var hash = req.params.hash;
if (typeof hash !== "string") {
res.send(400);
@ -663,18 +665,6 @@ function handlePasswordRecover(req, res) {
return;
}
if (row.ip && row.ip !== ip) {
sendJade(res, "account-passwordrecover", {
recovered: false,
recoverErr: "Your IP address does not match the address " +
"used to submit the reset request. For your " +
"security, only the IP which initiates the reset " +
"may reclaim an account.",
loginName: false
});
return;
}
if (Date.now() >= row.expire) {
sendJade(res, "account-passwordrecover", {
recovered: false,