Skip to content

Commit e7774ee

Browse files
author
leah.culver
committed
Fix for big timestamps. Thanks Zed Shaw!
git-svn-id: https://oauth.googlecode.com/svn/code/python@1134 f7ae4463-c52f-0410-a7dc-93bad6e629e8
1 parent 3b1107c commit e7774ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

oauth/oauth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def _check_timestamp(self, timestamp):
514514
"""Verify that timestamp is recentish."""
515515
timestamp = int(timestamp)
516516
now = int(time.time())
517-
lapsed = now - timestamp
517+
lapsed = abs(now - timestamp)
518518
if lapsed > self.timestamp_threshold:
519519
raise OAuthError('Expired timestamp: given %d and now %s has a '
520520
'greater difference than threshold %d' %

0 commit comments

Comments
 (0)