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

[tor-bugs] #34250 [Applications/Tor Browser]: Fix torbutton noscript-control race condition



#34250: Fix torbutton noscript-control race condition
------------------------------------------+--------------------------------
     Reporter:  acat                      |      Owner:  acat
         Type:  defect                    |     Status:  assigned
     Priority:  Medium                    |  Milestone:
    Component:  Applications/Tor Browser  |    Version:
     Severity:  Normal                    |   Keywords:
                                          |  TorBrowserTeam202005
Actual Points:                            |  Parent ID:
       Points:                            |   Reviewer:
      Sponsor:                            |
------------------------------------------+--------------------------------
 While debugging some testsuite tests, I saw some race condition with the
 noscript initialization which prevents some tests from running correctly.

 We currently listen for both `startup` and `pageshow` events
 [https://gitweb.torproject.org/torbutton.git/tree/modules/noscript-
 control.js?id=36f8182a25818548d62b7fbc6be4d2472773b820#n149 here], and in
 some tests, `pageshow` events are being received before `startup`, which
 results in the configuration message being lost and noscript being
 initialized with the default settings, blocking scripts.

 This was originally introduced in #27427, which added checks for the event
 types precisely because of these issues. However, "pageshow" in specific
 situations also seems to trigger those.

 In that ticket, "pageshow" was added `for a slightly more graceful failure
 mode in case Torbutton somehow misses NoScript startup`. However, I don't
 think that can really happen, and I suggest we just listen to `startup`.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/34250>
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