mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated SingleUseToken grace period to 10 minutes (#13926)
refs https://github.com/TryGhost/Team/issues/1216 Some email security clients are scanning links at delivery, rather than at the point the user clicks on them. This is causing magic links to expire. To get around this we're increasing the grace period in which a link can be used multiple times to 10 minutes.
This commit is contained in:
parent
507ae42205
commit
bc75d20cef
2 changed files with 6 additions and 2 deletions
|
@ -33,7 +33,7 @@ const SingleUseToken = ghostBookshelf.Model.extend({
|
|||
} catch (err) {
|
||||
logging.error(err);
|
||||
}
|
||||
}, 10000);
|
||||
}, 10 * 60 * 1000);
|
||||
}
|
||||
|
||||
return model;
|
||||
|
|
|
@ -34,7 +34,11 @@ describe('Unit: models/single-use-token', function () {
|
|||
|
||||
clock.tick(10000);
|
||||
|
||||
should.ok(destroyStub.called, 'destroy was called after 10 seconds');
|
||||
should.ok(!destroyStub.called, 'destroy was not called after 10 seconds');
|
||||
|
||||
clock.tick(10 * 60 * 1000 - 10000);
|
||||
|
||||
should.ok(destroyStub.called, 'destroy was not called after 10 seconds');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue