]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Don't raise when failing to hex decode XSRF v1
authorWilliam Tisäter <william@defunct.cc>
Tue, 8 Jul 2014 07:07:48 +0000 (09:07 +0200)
committerWilliam Tisäter <william@defunct.cc>
Tue, 8 Jul 2014 07:07:48 +0000 (09:07 +0200)
tornado/web.py

index 7147c17e625adf576354155fe81ac3e91414d1d0..11dab74f9c54bfafddb026a171e363fafa77efa0 100644 (file)
@@ -1145,7 +1145,7 @@ class RequestHandler(object):
             try:
                 token = binascii.a2b_hex(utf8(cookie))
             except TypeError:
-                raise HTTPError(400, "XSRF cookie is not a hexadecimal")
+                token = utf8(cookie)
             # We don't have a usable timestamp in older versions.
             timestamp = int(time.time())
             return (version, token, timestamp)