Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Tor Browser Tor Browser
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 681
    • Issues 681
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • The Tor Project
  • Applications
  • Tor BrowserTor Browser
  • Issues
  • #34250
Closed
Open
Created May 18, 2020 by Alex Catarineu@acat

Fix torbutton noscript-control race condition

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 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 legacy/trac#27427 (moved), 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.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking