[Python-modules-commits] r8406 - in packages/python-cherrypy/trunk/debian (2 files)

kov at users.alioth.debian.org kov at users.alioth.debian.org
Sat May 9 15:42:34 UTC 2009


    Date: Saturday, May 9, 2009 @ 15:42:33
  Author: kov
Revision: 8406

Accept patch to fix #514032; ignore invalid cookies

Added:
  packages/python-cherrypy/trunk/debian/patches/01_ignore_invalid_cookies.diff
Modified:
  packages/python-cherrypy/trunk/debian/changelog

Modified: packages/python-cherrypy/trunk/debian/changelog
===================================================================
--- packages/python-cherrypy/trunk/debian/changelog	2009-05-08 23:15:11 UTC (rev 8405)
+++ packages/python-cherrypy/trunk/debian/changelog	2009-05-09 15:42:33 UTC (rev 8406)
@@ -1,10 +1,17 @@
-python-cherrypy (2.3.0-2) UNRELEASED; urgency=low
+python-cherrypy (2.3.0-2) unstable; urgency=low
 
+  [ Sandro Tosi ]
   * debian/control
     - switch Vcs-Browser field to viewsvn
 
- -- Sandro Tosi <morph at debian.org>  Mon, 03 Nov 2008 22:14:57 +0100
+  [ Gustavo Noronha Silva ]
+  * debian/patches/01_ignore_invalid_cookies.diff:
+  - patch from upstream, provided by Alban Crequy
+    <ext-alban.crequy at nokia.com> to ignore invalid cookies
+    (Closes: #514032)
 
+ -- Gustavo Noronha Silva <kov at debian.org>  Sat, 09 May 2009 12:40:54 -0300
+
 python-cherrypy (2.3.0-1) unstable; urgency=low
 
   * New upstream release

Added: packages/python-cherrypy/trunk/debian/patches/01_ignore_invalid_cookies.diff
===================================================================
--- packages/python-cherrypy/trunk/debian/patches/01_ignore_invalid_cookies.diff	                        (rev 0)
+++ packages/python-cherrypy/trunk/debian/patches/01_ignore_invalid_cookies.diff	2009-05-09 15:42:33 UTC (rev 8406)
@@ -0,0 +1,20 @@
+--- ./cherrypy/_cphttptools.py.vanilla	2009-02-03 14:04:42.000000000 +0200
++++ ./cherrypy/_cphttptools.py	2009-02-03 16:20:13.000000000 +0200
+@@ -200,7 +200,16 @@ class Request(object):
+             # Handle cookies differently because on Konqueror, multiple
+             # cookies come on different lines with the same key
+             if name.title() == 'Cookie':
+-                self.simple_cookie.load(value)
++                # Cookies with a colon (":") are invalid according to rfc2965
++                # and rfc2068. However if the browser send such a cookie, we
++                # want to ignore it and continue instead of returning an
++                # "500 Internal Server Error" error. More infos on:
++                # http://www.cherrypy.org/ticket/868
++                try:
++                    self.simple_cookie.load(value)
++                except Cookie.CookieError, e:
++                    cherrypy.log("Unable to load user's cookie. Cookie ignored.")
++
+         
+         # Save original values (in case they get modified by filters)
+         # This feature is deprecated in 2.2 and will be removed in 2.3.




More information about the Python-modules-commits mailing list