I checked Python 2.2.a4 Cookie.py before reporting the bug. It looks
like they fixed it already. Here's their version:
_LegalCharsPatt = r"[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=]"
_CookiePattern = re.compile(
r"(?x)" # This is a Verbose pattern
r"(?P<key>" # Start of group 'key'
""+ _LegalCharsPatt +"+?" # Any word of at least one letter,
nongreedy
r")" # End of group 'key'
r"\s*=\s*" # Equal Sign
r"(?P<val>" # Start of group 'val'
r'"(?:[^\\"]|\\.)*"' # Any doublequoted string
r"|" # or
""+ _LegalCharsPatt +"*" # Any word or empty string
r")" # End of group 'val'
r"\s*;?" # Probably ending in a semi-colon
)
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Ian
> Bicking
> Sent: Friday, September 21, 2001 11:43 PM
> To: Jeff Johnson
> Cc: [EMAIL PROTECTED]
> Subject: RE: [Webware-devel] Bad cookies hang Webkit
>
>
> Probably best would be to post it as a bug to
> http://www.sf.net/projects/python
>
> "Love, Jay" <[EMAIL PROTECTED]> wrote:
> > Jeff-
> >
> > Please submit this bug to the Python-Devel list as well. I
> don't know the
> > address, but they need to fix it in their source as well.
> >
> > Thanks for tracking this down.
> >
> > Jay
> >
> > > -----Original Message-----
> > > From: Jeff Johnson [mailto:[EMAIL PROTECTED]]
> > > Sent: Thursday, September 20, 2001 6:16 PM
> > > To: Geoff Talvola; Love, Jay; [EMAIL PROTECTED]
> > > Subject: RE: [Webware-devel] Bad cookies hang Webkit
> > >
> > >
> > > Since I'm going on vacation as soon as I fix this problem, I
> > > decided I'd better try again. I didn't write the crappy
> > > cookie with the equal sign but my code has to deal with it...
> > >
> > > Here's a good fix for WebUtils.Cookie.py around line 518:
> > >
> > > # @@ JCJ - allow equal signs in the cookie value.
> > > #_LegalCharsPatt =
> r"[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{]*"
> > > _LegalCharsPattKey =
> > > r"[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{]*"
> > > _LegalCharsPattValue =
> > > r"[\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{=]*"
> > > _CookiePattern = re.compile(
> > > r"(?x)" # This is a Verbose pattern
> > > r"(?P<key>" # Start of group 'key'
> > > ""+ _LegalCharsPattKey +"" # Any word
> > > r")" # End of group 'key'
> > > r"\s*=\s*" # Equal Sign
> > > r"(?P<val>" # Start of group 'val'
> > > r'"(?:[^\\"]|\\.)*"' # Any doublequoted string
> > > r"|" # or
> > > ""+ _LegalCharsPattValue +"" # Any word
> > > r")" # End of group 'val'
> > > r"\s*;?" # Probably ending in a
> semi-colon
> > > )
> > >
> > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
> > > > [mailto:[EMAIL PROTECTED]]On
> Behalf Of Jeff
> > > > Johnson
> > > > Sent: Thursday, September 20, 2001 5:50 PM
> > > > To: Geoff Talvola; Love, Jay;
> [EMAIL PROTECTED]
> > > > Subject: RE: [Webware-devel] Bad cookies hang Webkit
> > > >
> > > >
> > > > Well, I found the person with the bad cookies. The offending
> > > > cookie is
> > > > has two equal signs in it! Is that legal??
> > > > "WWWLYCOS=SATISFACTIONSURVEY=N;"
> > > >
> > > > Does anyone have a suggestion of how we can handle this
> exception
> > > > gracefully or improve the parser?
> > > >
> > > >
> > > > I printed out the offending cookie and the exception below.
> > > >
> > > > lubid=010000508BD3046104E43BAA159C000AC84600000000;
> > > > WWWLYCOS=SATISFACTIONSURVEY=N; _SID_=2001092017242334450;
> > > > countyno=127;
> > > > state=FL; city=Barberville
> > > >
> > > > Traceback (most recent call last):
> > > > File "/usr/Webware/Webware/WebKit/HTTPRequest.py", line 47, in
> > > > __init__
> > > > self._cookies.load(self._environ['HTTP_COOKIE'])
> > > > File "WebUtils/Cookie.py", line 605, in load
> > > > for K,V in self.items():
> > > > File "WebUtils/Cookie.py", line 625, in __ParseString
> > > > n = len(str) # Length of string
> > > > IndexError: string index out of range
> > > >
> > > > _______________________________________________
> > > > Webware-devel mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/webware-devel
> > > >
> > >
> >
> >
> >
> --------------------------------------------------------------
> --------------
> >
> > This e-mail and any attachments may be confidential or
> legally privileged.
> > If you received this message in error or are not the
> intended recipient, you
> > should destroy the e-mail message and any attachments or
> copies, and you are
> > prohibited from retaining, distributing, disclosing or
> using any information
> > contained herein. Please inform us of the erroneous
> delivery by return
> > e-mail.
> >
> > Thank you for your cooperation.
> >
> >
> --------------------------------------------------------------
> --------------
> >
> >
> >
> > _______________________________________________
> > Webware-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/webware-devel
> >
>
> _______________________________________________
> Webware-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/webware-devel
>
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel