Skip to content

Commit

Permalink
Merge pull request tornadoweb#557 from raullenchai/master
Browse files Browse the repository at this point in the history
Fix handling of a limited form of secure_cookie tampering
  • Loading branch information
bdarnell committed Jul 4, 2012
2 parents 61007f8 + 1ca245f commit 00688f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tornado/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -2046,6 +2046,7 @@ def decode_signed_value(secret, name, value, max_age_days=31):
return None
if parts[1].startswith(b("0")):
logging.warning("Tampered cookie %r", value)
return None
try:
return base64.b64decode(parts[0])
except Exception:
Expand Down

0 comments on commit 00688f9

Please sign in to comment.