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

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Tue Jun 14 12:16:12 UTC 2011


#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


More information about the tor-bugs mailing list