Commits

dziegler  committed 04967b6

allow login if cookie expires is 0

  • Participants
  • Parent commits 9f15be9

Comments (0)

Files changed (1)

File src/facebook.py

     payload = "".join(k + "=" + args[k] for k in sorted(args.keys())
                       if k != "sig")
     sig = hashlib.md5(payload + app_secret).hexdigest()
-    if sig == args.get("sig") and time.time() < int(args["expires"]):
+    expires = int(args["expires"])
+    if sig == args.get("sig") and (expires is 0 or time.time() < expires):
         return args
     else:
         return None