Permalink
Browse files

Update lib/parser.js

clock skew was not handled for negative skews (requests from the future)
  • Loading branch information...
1 parent ba72d40 commit b26e4fe1956a45d5a7fa55ea015e7c155edb1009 @Felix-N Felix-N committed Feb 6, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/parser.js
View
@@ -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 ' +

0 comments on commit b26e4fe

Please sign in to comment.