Does CookieUtils.getAttributeValue working correctly?

16 views
Skip to first unread message

Kazuya, Muramatsu

unread,
Aug 15, 2023, 9:45:46 AM8/15/23
to ZAP Developer Group
Hello team,

I am new to Zap.
I apologize if I ask something wrong or duplicate questions.
I am using the getAttributeValue method in commonlib.CookieUtils, but it seems to be not working well.
For example, the following method call is not working.
---
getAttributeValue("SESSION=ODcxYjg3YzQmMy00OGJjLWI2ZmQtYTc2YTViNGUwNDky; Path=/; HttpOnly; SameSite=Lax", "session");
---

Because for sentence in line 69 in CookieUtils.java start it index from 1.
So I think it ignores "SESSION=ODcxYjg3YzQmMy00OGJjLWI2ZmQtYTc2YTViNGUwNDky;".
Therefore this method returns the null value despite the first argument including the "SESSION" string.
I modified the index from 0, it looks working correctly.

kingthorin+zap

unread,
Aug 15, 2023, 7:10:52 PM8/15/23
to ZAP Developer Group
In your example "SESSION" is the cookie name not an attribute. 

Kazuya, Muramatsu

unread,
Aug 15, 2023, 8:07:13 PM8/15/23
to ZAP Developer Group
Hello team,

Thank you for your response.
I was confounding cookie name with attribute name.
I will use another method.

Best regards.


2023年8月16日水曜日 8:10:52 UTC+9 kingthorin+zap:
Reply all
Reply to author
Forward
0 new messages