1. 15 Sep, 2020 40 commits
    • Alex Catarineu's avatar
      Bug 33342: Avoid disconnect search addon error after removal. · cc8d4b31
      Alex Catarineu authored
      We removed the addon in #32767, but it was still being loaded
      from addonStartup.json.lz4 and throwing an error on startup
      because its resource: location is not available anymore.
      cc8d4b31
    • Matthew Finkel's avatar
      3d15e14a
    • Matthew Finkel's avatar
      Bug 25741 - TBA: Disable GeckoNetworkManager · 29015fc3
      Matthew Finkel authored
      The browser should not need information related to the network
      interface or network state, tor should take care of that.
      29015fc3
    • Amogh Pradeep's avatar
      Orfox: Centralized proxy applied to AbstractCommunicator and BaseResources. · 7ada7110
      Amogh Pradeep authored
      See Bug 1357997 for partial uplift.
      
      Also:
      Bug 28051 - Use our Orbot for proxying our connections
      
      Bug 31144 - ESR68 Network Code Review
      7ada7110
    • Matthew Finkel's avatar
      Bug 24796 - Comment out excess permissions from GeckoView · fd2137ab
      Matthew Finkel authored
      The GeckoView AndroidManifest.xml is not preprocessed unlike Fennec's
      manifest, so we can't use the ifdef preprocessor guards around the
      permissions we do not want. Commenting the permissions is the
      next-best-thing.
      fd2137ab
    • Georg Koppen's avatar
      Bug 32658: Create a new MAR signing key · 1edd9cf8
      Georg Koppen authored
      It's time for our rotation again: Move the backup key in the front
      position and add a new backup key.
      1edd9cf8
    • Kathleen Brade's avatar
      Bug 30237: Add v3 onion services client authentication prompt · 6391eb0c
      Kathleen Brade authored
      When Tor informs the browser that client authentication is needed,
      temporarily load about:blank instead of about:neterror and prompt
      for the user's key.
      
      If a correctly formatted key is entered, use Tor's ONION_CLIENT_AUTH_ADD
      control port command to add the key (via Torbutton's control port
      module) and reload the page.
      
      If the user cancels the prompt, display the standard about:neterror
      "Unable to connect" page. This requires a small change to
      browser/actors/NetErrorChild.jsm to account for the fact that the
      docShell no longer has the failedChannel information. The failedChannel
      is used to extract TLS-related error info, which is not applicable
      in the case of a canceled .onion authentication prompt.
      
      Add a leaveOpen option to PopupNotifications.show so we can display
      error messages within the popup notification doorhanger without
      closing the prompt.
      
      Add support for onion services strings to the TorStrings module.
      
      Add support for Tor extended...
      6391eb0c
    • Richard Pospesel's avatar
      Bug 32220: Improve the letterboxing experience · 679e0074
      Richard Pospesel authored
      CSS and JS changes to alter the UX surrounding letterboxing. The
      browser element containing page content is now anchored to the bottom
      of the toolbar, and the remaining letterbox margin is the same color
      as the firefox chrome. The letterbox margin and border are tied to
      the currently selected theme.
      
      Also adds a 'needsLetterbox' property to tabbrowser.xml to fix a race
      condition present when using the 'isEmpty' property. Using 'isEmpty'
      as a proxy for 'needsLetterbox' resulted in over-zealous/unnecessary
      letterboxing of about:blank tabs.
      679e0074
    • Alex Catarineu's avatar
      c11dc471
    • Alex Catarineu's avatar
      Bug 31740: Remove some unnecessary RemoteSettings instances · 15fd040d
      Alex Catarineu authored
      More concretely, SearchService.jsm 'hijack-blocklists' and
      url-classifier-skip-urls.
      
      Avoid creating instance for 'anti-tracking-url-decoration'.
      
      If prefs are disabling their usage, avoid creating instances for
      'cert-revocations' and 'intermediates'.
      
      Do not ship JSON dumps for collections we do not expect to need. For
      the ones in the 'main' bucket, this prevents them from being synced
      unnecessarily (the code in remote-settings does so for collections
      in the main bucket for which a dump or local data exists). For the
      collections in the other buckets, we just save some size by not
      shipping their dumps.
      
      We also clear the collections database on the v2 -> v3 migration.
      15fd040d
    • Alex Catarineu's avatar
      851183a6
    • Richard Pospesel's avatar
      Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#tor · ffa97640
      Richard Pospesel authored
      This patch adds a new about:preferences#tor page which allows modifying
      bridge, proxy, and firewall settings from within Tor Browser. All of the
      functionality present in tor-launcher's Network Configuration panel is
      present:
      
       - Setting built-in bridges
       - Requesting bridges from BridgeDB via moat
       - Using user-provided bridges
       - Configuring SOCKS4, SOCKS5, and HTTP/HTTPS proxies
       - Setting firewall ports
       - Viewing and Copying Tor's logs
       - The Networking Settings in General preferences has been removed
      ffa97640
    • Alex Catarineu's avatar
    • Kathleen Brade's avatar
      Bug 31607: App menu items stop working on macOS · a8866b1a
      Kathleen Brade authored
      Avoid re-creating the hidden window, since this causes the nsMenuBarX
      object that is associated with the app menu to be freed (which in
      turn causes all of the app menu items to stop working).
      
      More detail: There should only be one hidden window.
      XREMain::XRE_mainRun() contains an explicit call to create the
      hidden window and that is the normal path by which it is created.
      However, when Tor Launcher's wizard/progress window is opened during
      startup, a hidden window is created earlier as a side effect of
      calls to nsAppShellService::GetHiddenWindow(). Then, when
      XREMain::XRE_mainRun() creates its hidden window, the original one
      is freed which also causes the app menu's nsMenuBarX object which
      is associated with that window to be destroyed. When that happens,
      the menuGroupOwner property within each Cocoa menu items's MenuItemInfo
      object is cleared. This breaks the link that is necessary for
      NativeMenuItemTarget's menuItemHit method to dispatch a menu item
      event.
      a8866b1a
    • Kathleen Brade's avatar
      Bug 26961: New user onboarding. · 1f10e0cf
      Kathleen Brade authored
      Reuse the Firefox onboarding mechanism with minimal changes.
      Localizable strings are pulled in from Torbutton (if Torbutton is
        not installed, we lack about:tor and no tour will be shown).
      Replace SVG images with PNGs (see bug 27002),
      For defense in depth, omit include OnboardingTelemetry.jsm entirely.
      Added support for the following UITour page event:
        torBrowserOpenSecuritySettings
      
      Also fix bug 27403: the onboarding bubble is not always displayed.
      
      Arthur suggested to make the onboarding bubble visible on displays with
      less than 960px width available, so we choose 200px instead.
      
      Also fix bug 28628: Change onboarding Security panel to open new
      Security Level panel.
      
      Also fix bug 27484: Improve navigation within onboarding.
      
      Bug 27082: enable a limited UITour
      
      Disallow access to UITour functionality from all pages other than
        about:home, about:newtab, and about:tor.
      Implement a whitelist mechanism for page actions.
      
      Bug 26962 - implement new features onboarding (part 1...
      1f10e0cf
    • Alex Catarineu's avatar
      Bring back old Firefox onboarding · 75c2719f
      Alex Catarineu authored
      Revert "Bug 1462415 - Delete onboarding system add-on r=Standard8,k88hudson"
      
      This reverts commit f7ffd78b.
      
      Revert "Bug 1498378 - Actually remove the old onboarding add-on's prefs r=Gijs"
      
      This reverts commit 057fe36f.
      
      Bug 28822: Convert onboarding to webextension
      
      Partially revert 1564367 (controlCenter in UITour.jsm)
      75c2719f
    • Alex Catarineu's avatar
      Bug 27511: Add new identity button to toolbar · 62285409
      Alex Catarineu authored
      Also added 'New circuit for this site' button to CustomizableUI, but
      not visible by default.
      62285409
    • Alex Catarineu's avatar
      Bug 31575: Replace Firefox Home (newtab) with about:tor · 48ca0507
      Alex Catarineu authored
      Avoid loading AboutNewTab in BrowserGlue.jsm in order
      to avoid several network requests that we do not need. Besides,
      about:newtab will now point to about:blank or about:tor (depending
      on browser.newtabpage.enabled) and about:home will point to
      about:tor.
      48ca0507
    • Alex Catarineu's avatar
      Bug 26345: Hide tracking protection UI · 0a3db5dd
      Alex Catarineu authored
      0a3db5dd
    • Alex Catarineu's avatar
    • Georg Koppen's avatar
      2c607317
    • Richard Pospesel's avatar
      Bug 23247: Communicating security expectations for .onion · 6026b91a
      Richard Pospesel authored
      Encrypting pages hosted on Onion Services with SSL/TLS is redundant
      (in terms of hiding content) as all traffic within the Tor network is
      already fully encrypted.  Therefore, serving HTTP pages from an Onion
      Service is more or less fine.
      
      Prior to this patch, Tor Browser would mostly treat pages delivered
      via Onion Services as well as pages delivered in the ordinary fashion
      over the internet in the same way.  This created some inconsistencies
      in behaviour and misinformation presented to the user relating to the
      security of pages delivered via Onion Services:
      
       - HTTP Onion Service pages did not have any 'lock' icon indicating
         the site was secure
       - HTTP Onion Service pages would be marked as unencrypted in the Page
         Info screen
       - Mixed-mode content restrictions did not apply to HTTP Onion Service
         pages embedding Non-Onion HTTP content
      
      This patch fixes the above issues, and also adds several new 'Onion'
      icons to the mix to indicate all of the various permutations of Onion
      Services hosted HTTP or HTTPS pages with HTTP or HTTPS content.
      
      Strings for Onion Service Page Info page are pulled from Torbutton's
      localization strings.
      6026b91a
    • Alex Catarineu's avatar
      6ae23a1d
    • Arthur Edelstein's avatar
      Bug 26353: Prevent speculative connect that violated FPI. · e631f448
      Arthur Edelstein authored
      Connections were observed in the catch-all circuit when
      the user entered an https or http URL in the URL bar, or
      typed a search term.
      e631f448
    • Richard Pospesel's avatar
      Bug 25658: Replace security slider with security level UI · 31c6d83c
      Richard Pospesel authored
      This patch adds a new 'securitylevel' component to Tor Browser intended
      to replace the torbutton 'Security Slider'.
      
      This component adds a new Security Level toolbar button which visually
      indicates the current global security level via icon (as defined by the
      extensions.torbutton.security_slider pref), a drop-down hanger with a
      short description of the current security level, and a new section in
      the about:preferences#privacy page where users can change their current
      security level. In addition, the hanger and the preferences page will
      show a visual warning when the user has modified prefs associated with
      the security level and provide a one-click 'Restore Defaults' button to
      get the user back on recommended settings.
      
      Strings used by this patch are pulled from the torbutton extension, but
      en-US defaults are provided if there is an error loading from the
      extension. With this patch applied, the usual work-flow of "./mach build
      && ./mach run" work as expected, even if the torbutton extension is
      disabled.
      31c6d83c
    • Igor Oliveira's avatar
      Bug 23104: Add a default line height compensation · 76c12201
      Igor Oliveira authored
      Many fonts have issues with their vertical metrics. they
      are used to influence the height of ascenders and depth
      of descenders. Gecko uses it to calculate the line height
      (font height + ascender + descender), however because of
      that idiosyncratic behavior across multiple operating
      systems, it can be used to identify the user's OS.
      
      The solution proposed in the patch uses a default factor
      to be multiplied with the font size, simulating the concept
      of ascender and descender. This way all operating
      systems will have the same line height only and only if the
      frame is outside the chrome.
      76c12201
    • Georg Koppen's avatar
      Bug 21830: Copying large text from web console leaks to /tmp · 8f1fb5c4
      Georg Koppen authored
      Patch written by Neill Miller
      8f1fb5c4
    • Kathleen Brade's avatar
      Bug 21431: Clean-up system extensions shipped in Firefox · dad63721
      Kathleen Brade authored
      Only ship the pdfjs extension.
      dad63721
    • Georg Koppen's avatar
      Bug 16285: Exclude ClearKey system for now · c8578096
      Georg Koppen authored
      In the past the ClearKey system had not been compiled when specifying
      --disable-eme. But that changed and it is even bundled nowadays (see:
      Mozilla's bug 1300654). We don't want to ship it right now as the use
      case for it is not really visible while the code had security
      vulnerabilities in the past.
      c8578096
    • Mike Perry's avatar
      Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing · c33ca201
      Mike Perry authored
      eBay and Amazon don't treat Tor users very well. Accounts often get locked and
      payments reversed.
      
      Also:
      Bug 16322: Update DuckDuckGo search engine
      
      We are replacing the clearnet URL with an onion service one (thanks to a
      patch by a cypherpunk) and are removing the duplicated DDG search
      engine. Duplicating DDG happend due to bug 1061736 where Mozilla
      included DDG itself into Firefox. Interestingly, this caused breaking
      the DDG search if JavaScript is disabled as the Mozilla engine, which
      gets loaded earlier, does not use the html version of the search page.
      Moreover, the Mozilla engine tracked where the users were searching from
      by adding a respective parameter to the search query. We got rid of that
      feature as well.
      
      Also:
      This fixes bug 20809: the DuckDuckGo team has changed its server-side
      code in a way that lets users with JavaScript enabled use the default
      landing page while those without JavaScript available get red...
      c33ca201
    • Kathleen Brade's avatar
      Bug 16940: After update, load local change notes. · 3cc6932c
      Kathleen Brade authored
      Add an about:tbupdate page that displays the first section from
      TorBrowser/Docs/ChangeLog.txt and includes a link to the remote
      post-update page (typically our blog entry for the release).
      
      Always load about:tbupdate in a content process, but implement the
      code that reads the file system (changelog) in the chrome process
      for compatibility with future sandboxing efforts.
      
      Also fix bug 29440. Now about:tbupdate is styled as a fairly simple
      changelog page that is designed to be displayed via a link that is on
      about:tor.
      3cc6932c
    • Kathleen Brade's avatar
      Bug 13379: Sign our MAR files. · 478bda62
      Kathleen Brade authored
      Configure with --enable-verify-mar (when updating, require a valid
        signature on the MAR file before it is applied).
      Use the Tor Browser version instead of the Firefox version inside the
        MAR file info block (necessary to prevent downgrade attacks).
      Use NSS on all platforms for checking MAR signatures (instead of using
        OS-native APIs, which Mozilla does on Mac OS and Windows). So that the
        NSS and NSPR libraries the updater depends on can be found at runtime,
        we add the firefox directory to the shared library search path on macOS.
        On Linux, rpath is used by Mozilla to solve that problem, but that
        approach won't work on macOS because the updater executable is copied
        during the update process to a location that is under TorBrowser-Data,
        and the location of TorBrowser-Data varies.
      
      Also includes the fix for bug 18900.
      478bda62
    • Kathleen Brade's avatar
      Bug 4234: Use the Firefox Update Process for Tor Browser. · 12b3435d
      Kathleen Brade authored
      The following files are never updated:
        TorBrowser/Data/Browser/profiles.ini
        TorBrowser/Data/Browser/profile.default/bookmarks.html
        TorBrowser/Data/Tor/torrc
      Mac OS: Store update metadata under TorBrowser/UpdateInfo.
      Removed the %OS_VERSION% component from the update URL (13047) and
        added support for minSupportedOSVersion, an attribute of the
        <update> element that may be used to trigger Firefox's
        "unsupported platform" behavior.
      Hide the "What's new" links (set app.releaseNotesURL value to about:blank).
      Windows: disable "runas" code path in updater (15201).
      Windows: avoid writing to the registry (16236).
      Also includes fixes for tickets 13047, 13301, 13356, 13594, 15406,
        16014, 16909, 24476, and 25909.
      
      Also fix Bug 26049: reduce the delay before the update prompt is displayed.
      Instead of Firefox's 2 days, we use 1 hour (after which time the update
      doorhanger will be displayed).
      
      Also fix bug 27221: purge the startup cache if the Tor Br...
      12b3435d
    • Kathleen Brade's avatar
      Bug 19121: reinstate the update.xml hash check · d840ae17
      Kathleen Brade authored
      Revert most changes from Mozilla Bug 1373267 "Remove hashFunction and
      hashValue attributes from nsIUpdatePatch and code related to these
      attributes." Changes to the tests were not reverted; the tests have
      been changed significantly and we do not run automated updater tests
      for Tor Browser at this time.
      
      Also partial revert of commit f1241db6.
      
      Revert the nsUpdateService.js changes from Mozilla Bug 862173 "don't
      verify mar file hash when using mar signing to verify the mar file
      (lessens main thread I/O)."
      
      Changes to the tests were not reverted; the tests have been changed
      significantly and we do not run automated updater tests for
      Tor Browser at this time.
      
      We kept the addition to the AppConstants API in case other JS code
      references it in the future.
      d840ae17
    • teor's avatar
      Bug 21724: Make Firefox and Tor Browser distinct macOS apps · 1de26b5f
      teor authored
      When macOS opens a document or selects a default browser, it sometimes
      uses the CFBundleSignature. Changing from the Firefox MOZB signature to
      a different signature TORB allows macOS to distinguish between Firefox
      and Tor Browser.
      1de26b5f
    • Kathleen Brade's avatar
      Bug 11641: change TBB directory structure to be more like Firefox's · 32dfc397
      Kathleen Brade authored
      Unless the -osint command line flag is used, the browser now defaults
      to the equivalent of -no-remote.  There is a new -allow-remote flag that
      may be used to restore the original (Firefox-like) default behavior.
      32dfc397
    • Kathleen Brade's avatar
      Bug 19273: Avoid JavaScript patching of the external app helper dialog. · 1946e3f9
      Kathleen Brade authored
      When handling an external URI or downloading a file, invoke Torbutton's
      external app blocker component (which will present a download warning
      dialog unless the user has checked the "Automatically download files
      from now on" box).
      
      For e10s compatibility, avoid using a modal dialog and instead use
      a callback interface (nsIHelperAppWarningLauncher) to allow Torbutton
      to indicate the user's desire to cancel or continue each request.
      
      Other bugs fixed:
       Bug 21766: Crash with e10s enabled while trying to download a file
       Bug 21886: Download is stalled in non-e10s mode
       Bug 22471: Downloading files via the PDF viewer download button is broken
       Bug 22472: Fix FTP downloads when external helper app dialog is shown
       Bug 22610: Avoid crashes when canceling external helper app downloads
       Bug 22618: Downloading pdf file via file:/// is stalling
      1946e3f9
    • Georg Koppen's avatar
      Bug 18821: Disable libmdns for Android and Desktop · 958d3965
      Georg Koppen authored
      There should be no need to remove the OS X support introduced in
      https://bugzilla.mozilla.org/show_bug.cgi?id=1225726 as enabling this
      is governed by a preference (which is actually set to `false`). However,
      we remove it at build time as well (defense in depth).
      
      This is basically a backout of the relevant passages of
      https://hg.mozilla.org/mozilla-central/rev/6bfb430de85d,
      https://hg.mozilla.org/mozilla-central/rev/609b337bf7ab and
      https://hg.mozilla.org/mozilla-central/rev/8e092ec5fbbd.
      
      Fixed bug 21861 (Disable additional mDNS code to avoid proxy bypasses)
      as well.
      958d3965
    • Kathleen Brade's avatar
      Bug 18800: Remove localhost DNS lookup in nsProfileLock.cpp · e8d96261
      Kathleen Brade authored
      Instead of using the local computer's IP address within
      symlink-based profile lock signatures, always use 127.0.0.1.
      e8d96261
    • Kathleen Brade's avatar
      Bug 16620: Clear window.name when no referrer sent · 25edcec8
      Kathleen Brade authored
      Convert JS implementation (within Torbutton) to a C++ browser patch.
      25edcec8