Skip to content

Commit

Permalink
Update lib/parser.js
Browse files Browse the repository at this point in the history
clock skew was not handled for negative skews (requests from the future)
  • Loading branch information
Felix-N committed Feb 6, 2013
1 parent ba72d40 commit b26e4fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/parser.js
Expand Up @@ -263,7 +263,7 @@ module.exports = {
var now = new Date();
var skew = Math.abs(now.getTime() - date.getTime());

if ((now.getTime() - date.getTime()) > options.clockSkew * 1000) {
if (skew > options.clockSkew * 1000) {
throw new ExpiredRequestError('clock skew of ' +
(skew / 1000) +
's was greater than ' +
Expand Down

0 comments on commit b26e4fe

Please sign in to comment.