Commit c88a01d1 authored by Jim Fulton's avatar Jim Fulton

Changed to allow '=' in unquoted cookies and fixed what looked like

a bug that would allow spaces in unquoted cookies.
parent 2029e1c3
...@@ -84,8 +84,8 @@ ...@@ -84,8 +84,8 @@
############################################################################## ##############################################################################
__doc__="""Python Object Publisher -- Publish Python objects on web servers __doc__="""Python Object Publisher -- Publish Python objects on web servers
$Id: Publish.py,v 1.116 1999/01/05 16:17:19 brian Exp $""" $Id: Publish.py,v 1.117 1999/01/06 14:37:03 jim Exp $"""
__version__='$Revision: 1.116 $'[11:-2] __version__='$Revision: 1.117 $'[11:-2]
import sys, os, string, cgi, regex import sys, os, string, cgi, regex
from string import lower, atoi, rfind, split, strip, join, upper, find from string import lower, atoi, rfind, split, strip, join, upper, find
...@@ -764,7 +764,7 @@ def parse_cookie(text, ...@@ -764,7 +764,7 @@ def parse_cookie(text,
), ),
parmre=regex.compile( parmre=regex.compile(
'\([\0- ]*' '\([\0- ]*'
'\([^\0- ;,=\"]+\)=\([^\0;-=\"]*\)' '\([^\0- ;,=\"]+\)=\([^\0- ;,\"]*\)'
'\([\0- ]*[;,]\)?[\0- ]*\)' '\([\0- ]*[;,]\)?[\0- ]*\)'
), ),
acquire=parse_cookie_lock.acquire, acquire=parse_cookie_lock.acquire,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment