[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #3399 [Torbutton]: possible js exception in CookieJarSelector.addProtectedCookie



#3399: possible js exception in CookieJarSelector.addProtectedCookie
-----------------------+----------------------------------------------------
 Reporter:  arno       |          Owner:  mikeperry
     Type:  defect     |         Status:  new      
 Priority:  normal     |      Milestone:           
Component:  Torbutton  |        Version:           
 Keywords:             |         Parent:           
   Points:             |   Actualpoints:           
-----------------------+----------------------------------------------------
 Hi,
 while reading components/cookie-jar-selector.js,
 I discovered following code:

     var cookies = this.getProtectedCookies(name);

     if (cookies.toString() == "" || cookies == null)
       cookies = new XML('<cookies/>');


 And getProtectedCookies may return null.
 If getProtectedCookies returns null, cookies.toString() will throw a
 TypeError
 may be, check could be:

     if (cookies == null || cookies.toString() == "")
 or ever

     if (!cookies)

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/3399>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs