From 2aa1b00dbbba61a83deee54d0ec4bbcaa1301bd2 Mon Sep 17 00:00:00 2001 From: shypike Date: Sat, 27 Oct 2012 13:33:33 +0200 Subject: [PATCH] Prevent CherryPy crash when reading a cookie from another app which has a non-standard name. --- cherrypy/_cprequest.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cherrypy/_cprequest.py b/cherrypy/_cprequest.py index 18950d6..c4e46ea 100644 --- a/cherrypy/_cprequest.py +++ b/cherrypy/_cprequest.py @@ -658,7 +658,10 @@ class Request(object): # Handle cookies differently because on Konqueror, multiple # cookies come on different lines with the same key if name == 'Cookie': - self.cookie.load(value) + try: + self.cookie.load(value) + except: + pass if not dict.__contains__(headers, 'Host'): # All Internet-based HTTP/1.1 servers MUST respond with a 400