3a9LL / attackapi

Automatically exported from code.google.com/p/attackapi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

getCookie function returns null

GoogleCodeExporter opened this issue · comments

This is a trivial one;

What steps will reproduce the problem?
1.
with document.cookie is equal to PHPSESSID=9b243572455a4d62683de5dd8544da1e
a javascript line like below
myCookieVal = AttackAPI.dom.getCookie("PHPSESSID");

What is the expected output? What do you see instead?
expected output: 
myCookieVal = 9b243572455a4d62683de5dd8544da1e
instead;
myCookieVal = null

What version of the product are you using? On what operating system?
2.2.0a, XPPro_SP2, IE6

Please provide any additional information below.
lines in getCookie function 

  if (cookie == unescape(pair.substring(0, name.length)))
    return unescape(pair.substring(name.length + 1));

might be changed to 

  if (cookie == unescape(pair.substring(0, cookie.length)))
    return unescape(pair.substring(cookie.length + 1));


Original issue reported on code.google.com by bedirhan...@gmail.com on 7 May 2007 at 4:13

Original comment by pdp.gnucitizen on 10 Feb 2011 at 4:51

  • Changed state: WontFix