From: William Tisäter Date: Tue, 8 Jul 2014 07:07:48 +0000 (+0200) Subject: Don't raise when failing to hex decode XSRF v1 X-Git-Tag: v4.0.0b3~2^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2299cf96bb12ff1ffc26f5e6bd071fdd37fd2204;p=thirdparty%2Ftornado.git Don't raise when failing to hex decode XSRF v1 --- diff --git a/tornado/web.py b/tornado/web.py index 7147c17e6..11dab74f9 100644 --- a/tornado/web.py +++ b/tornado/web.py @@ -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)