#13 WebScarab header parsing error

closed-fixed
Rogan Dawes
5
2005-03-24
2005-03-23
Scott Hasse
No

WebScarab logs an error when parsing certain headers.
Specifically, the following error:

java.lang.IllegalArgumentException: Bad format for
'Discard'

occurs when parsing a header like the following:
Set-Cookie2: JSESSIONID=xxxxxxxx;Version=1;Discard;Path="/"

This is causing me to not be able to access certain
sites through WebScarab. The parsing code in question
is in org.owasp.webscarab.model.Cookie.java around line
139.

A more complete stack trace follows:

13:53:47
Listener-127.0.0.1:8008-1833(ConnectionHandler.run):
ConnectionHandler
got an error : java.lang.IllegalArgumentException: Bad
format for 'Discard'
java.lang.IllegalArgumentException: Bad format for
'Discard'
at
org.owasp.webscarab.model.Cookie.parseHeader(Unknown
Source)
at
org.owasp.webscarab.model.Cookie.<init>(Unknown Source)
at
org.owasp.webscarab.plugin.proxy.CookieTracker$Plugin.fetchResponse(U
nknown Source)
at
org.owasp.webscarab.plugin.proxy.BrowserCache$Plugin.fetchResponse(Un
known Source)
at
org.owasp.webscarab.plugin.proxy.RevealHidden$Plugin.fetchResponse(Un
known Source)
at
org.owasp.webscarab.plugin.proxy.BeanShell$Plugin.fetchResponse(Unkno
wn Source)
at
org.owasp.webscarab.plugin.proxy.ManualEdit$Plugin.fetchResponse(Unkn
own Source)
at
org.owasp.webscarab.plugin.proxy.ConnectionHandler.run(Unknown
Source
)
at java.lang.Thread.run(Unknown Source)

Thanks,

Scott

Discussion

  • Rogan Dawes
    Rogan Dawes
    2005-03-23

    Logged In: YES
    user_id=438260

    OK, I guess I need to make some kind of noise when parsing a
    cookie falg that I don't understand, but maybe throwing an
    exception is a little strong. I'll try to fix this in the
    next release.

     
  • Rogan Dawes
    Rogan Dawes
    2005-03-24

    Logged In: YES
    user_id=438260

    This has been fixed in CVS, and will be included in a future
    release.

     
  • Rogan Dawes
    Rogan Dawes
    2005-03-24

    • status: open --> closed-fixed