[Lispweb] Cookie parsing error

Richard Newman r.newman at reading.ac.uk
Tue May 30 12:30:02 CDT 2006


If you look in /araneida/utility/rfc2109.lisp, you'll see around line  
930:

(let* ((chopped (split-along-quoted-lws cookie-string))
        (version-string (car chopped)))
   (if (string-equal "$Version="
...

Basically, it's doing a subseq 0 9 on the first field in the cookie,  
trying to find a version string. In your case, that's "exp=0", which  
is too short.

I made that safe and made a few other enhancements in my repo; look  
at the patch records and see which one to apply.

-R

On  30 May 2006, at 6:04 AM, Jonathon McKitrick wrote:

>
> I was reading some cookies for authentication and sometimes I get  
> this error.
> Any idea what I am doing wrong?
>
> The bounding indices 0 and 9 are bad for a sequence of length 5.
>    [Condition of type SB-KERNEL:BOUNDING-INDICES-BAD-ERROR]
>
>    See also:
>      Common Lisp Hyperspec, bounding index designator [glossary]
> 	   Common Lisp Hyperspec, SUBSEQ-OUT-OF-BOUNDS:IS-AN-ERROR [issue]
>
> 	   Restarts:
> 	     0: [ABORT-RESPONSE] Abort this response and answer another  
> request
> 		   1: [ABORT] Exit debugger, returning to top level.
>
> 		   Backtrace:
> 		     0: (SB-IMPL::SIGNAL-BOUNDING-INDICES-BAD-ERROR "exp=0" 0 9)
> 			   1: (SB-IMPL::VECTOR-SUBSEQ* "exp=0" 0 #<unavailable argument>)
> 			     2: (RFC2109:PARSE-COOKIES "exp=0; user=0; digest=0")
> 				       Locals:
> 					           SB-DEBUG::ARG-0 = "exp=0; user=0; digest=0"
>
> Jonathon McKitrick
> --
> My other computer is your Windows box.
>
> _______________________________________________
> lispweb mailing list
> lispweb at red-bean.com
> http://www.red-bean.com/mailman/listinfo/lispweb




More information about the lispweb mailing list