mirror of https://github.com/calzoneman/sync.git
Disable IP check for password recovery, resolves #376
This commit is contained in:
parent
81d16b09fa
commit
8c50655ff2
|
@ -645,6 +645,8 @@ function handlePasswordReset(req, res) {
|
||||||
* Handles a request for /account/passwordrecover/<hash>
|
* Handles a request for /account/passwordrecover/<hash>
|
||||||
*/
|
*/
|
||||||
function handlePasswordRecover(req, res) {
|
function handlePasswordRecover(req, res) {
|
||||||
|
logRequest(req);
|
||||||
|
|
||||||
var hash = req.params.hash;
|
var hash = req.params.hash;
|
||||||
if (typeof hash !== "string") {
|
if (typeof hash !== "string") {
|
||||||
res.send(400);
|
res.send(400);
|
||||||
|
@ -663,18 +665,6 @@ function handlePasswordRecover(req, res) {
|
||||||
return;
|
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) {
|
if (Date.now() >= row.expire) {
|
||||||
sendJade(res, "account-passwordrecover", {
|
sendJade(res, "account-passwordrecover", {
|
||||||
recovered: false,
|
recovered: false,
|
||||||
|
|
Loading…
Reference in New Issue