Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gk/tor-browser
  • peterstory/tor-browser
  • sanketh/tor-browser
  • acat/tor-browser
  • sysrqb/tor-browser
  • boklm/tor-browser
  • dan/tor-browser
  • fabrizio/tor-browser
  • victorvw/tor-browser
  • aguestuser/tor-browser
  • WofWca/tor-browser
  • p13dz/tor-browser
  • mwolfe/tor-browser
  • tpo/applications/tor-browser
  • brade/tor-browser
  • pierov/tor-browser
  • ma1/tor-browser
  • JeremyRand/tor-browser
  • henry/tor-browser
  • msimonelli/tor-browser
  • cypherpunks1/tor-browser
  • blackZwork/tor-browser
  • starlingroot/tor-browser
  • cohosh/tor-browser
  • t-m-w/tor-browser
  • trinity-1686a/tor-browser
  • HHN/tor-browser
  • emmapeel/tor-browser
  • Achintya_Sharma/tor-browser
  • guest475646844/tor-browser
  • Mima/tor-browser
  • morgan/tor-browser
  • clairehurst/tor-browser
  • NoisyCoil/tor-browser
  • gus/tor-browser
  • Francewhoa/tor-browser
  • novialriptide/tor-browser
  • jwilde/tor-browser
  • brizental/tor-browser
  • ourhopeforfreedom/tor-browser
  • onyinyang/tor-browser
  • Noino/tor-browser
  • murmelurmel/tor-browser
43 results
Show changes
Commits on Source (33)
  • Richard Pospesel's avatar
  • Mike Perry's avatar
    Bug 2176: Rebrand Firefox to TorBrowser · 78b5b3e0
    Mike Perry authored
    See also Bugs #5194, #7187, #8115, #8219.
    
    This patch does some basic renaming of Firefox to TorBrowser. The rest of the
    branding is done by images and icons.
    
    Also fix bug 27905.
    
    Bug 25702: Update Tor Browser icon to follow design guidelines
    
    - Updated all of the branding in /browser/branding/official with new 'stable'
    icon series.
    - Updated /extensions/onboarding/content/img/tor-watermark.png with new icon and
    add the source svg in the same directory
    - Copied /browser/branding/official over /browser/branding/nightly and the new
    /browser/branding/alpha directories. Replaced content with 'nightly' and
    'alpha' icon series.
    Updated VisualElements_70.png and VisualElements_150.png with updated icons in
    each branding directory (fixes #22654)
    - Updated firefox.VisualElementsManfiest.xml with updated colors in each
    branding directory
    - Added firefox.svg to each branding directory from which all the other icons
    are derived (apart from document.icns and document.ico)
    - Added default256.png and default512.png icons
    - Updated aboutTBUpdate.css to point to branding-aware icon128.png and removed
    original icon
    - Use the Tor Browser icon within devtools/client/themes/images/.
    
    Bug 30631: Blurry Tor Browser icon on macOS app switcher
    
    It would seem the png2icns tool does not generate correct icns files and
    so on macOS the larger icons were missing resulting in blurry icons in
    the OS chrome. Regenerated the padded icons in a macOS VM using
    iconutil.
    
    Bug 28196: preparations for using torbutton tor-browser-brand.ftl
    
    A small change to Fluent FileSource class is required so that we
    can register a new source without its supported locales being
    counted as available locales for the browser.
    
    Bug 31803: Replaced about:debugging logo with flat version
    
    Bug 21724: Make Firefox and Tor Browser distinct macOS apps
    
    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.
    
    Bug 32092: Fix Tor Browser Support link in preferences
    
    For bug 40562, we moved onionPattern* from bug 27476 to here, as
    about:tor needs these files but it is included earlier.
    
    Bug 41278: Create Tor Browser styled pdf logo similar to the vanilla Firefox one
    78b5b3e0
  • Alex Catarineu's avatar
    Bring back old Firefox onboarding · e5e05f86
    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)
    e5e05f86
  • Kathleen Brade's avatar
    Bug 26961: New user onboarding. · 11b2f5a4
    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).
    
    Add an "Explore" button to the "Circuit Display" panel within new user
    onboarding which opens the DuckDuckGo .onion and then guides users through
    a short circuit display tutorial.
    
    Allow a few additional UITour actions while limiting as much as possible
    how it can be used.
    
    Tweak the UITour styles to match the Tor Browser branding.
    
    All user interface strings are retrieved from Torbutton's
    browserOnboarding.properties file.
    
    Bug 27486 Avoid about:blank tabs when opening onboarding pages.
    
    Instead of using a simple <a href>, programmatically open onboarding
    web pages by using tabBrowser.addTab(). The same technique is now
    used for "See My Path", "See FAQs", and "Visit an Onion".
    
    Bug 29768: Introduce new features to users
    
    Add an "update" tour for the Tor Browser 8.5 release that contains two
    panels: Toolbar and Security (with appropriate description text and
    images).
    
    Display an attention-grabbing dot on the onboarding text bubble when
    the update tour is active. The animation lasts for 14 seconds.
    
    Bug 31768: Introduce toolbar and network settings changes in onboarding
    
    Update the "Tor Network" onboarding page to include a note that
    settings can now be accessed via the application preferences and
    add an "Adjust Your Tor Network Settings" action button which opens
    about:preferences#tor.
    
    Replace the Tor Browser 8.5 "update" onboarding tour with a 9.0 one
    that includes the revised "Tor Network" page and a revised "Toolbar"
    page. The latter explains that Torbutton's toolbar item has been
    removed ("Goodbye Onion Button") and explains how to access the
    New Identity feature using the hamburger menu and new toolbar item.
    
    Bug 34321 - Add Learn More onboarding item
    
    Bug 40429: Update Onboarding for 10.5
    11b2f5a4
  • Mike Perry's avatar
    TB3: Tor Browser's official .mozconfigs. · 1e8f6720
    Mike Perry authored
    Also:
    Bug #9829.1: new .mozconfig file for the new cross-compiler and ESR24
    Changes needed to build Mac in 64bit
    Bug 10715: Enable Webgl for mingw-w64 again.
    Disable ICU when cross-compiling; clean-up.
    Bug 15773: Enable ICU on OS X
    Bug 15990: Don't build the sandbox with mingw-w64
    Bug 12761: Switch to ESR 38 for OS X
    Updating .mozconfig-asan
    Bug 12516: Compile hardenend Tor Browser with -fwrapv
    Bug 18331: Switch to Mozilla's toolchain for building Tor Browser for OS X
    Bug 17858: Cannot create incremental MARs for hardened builds.
    Define HOST_CFLAGS, etc. to avoid compiling programs such as mbsdiff
    (which is part of mar-tools and is not distributed to end-users) with
    ASan.
    Bug 13419: Add back ICU for Windows
    Bug 21239: Use GTK2 for ESR52 Linux builds
    Bug 23025: Add hardening flags for macOS
    Bug 24478: Enable debug assertions and tests in our ASan builds
    --enable-proxy-bypass-protection
    Bug 27597: ASan build option in tor-browser-build is broken
    
    Bug 27623 - Export MOZILLA_OFFICIAL during desktop builds
    
    This fixes a problem where some preferences had the wrong default value.
    Also see bug 27472 where we made a similar fix for Android.
    
    Bug 30463: Explicitly disable MOZ_TELEMETRY_REPORTING
    
    Bug 31450: Set proper BINDGEN_CFLAGS for ASan builds
    
    Add an --enable-tor-browser-data-outside-app-dir configure option
    
    Add --with-tor-browser-version configure option
    
    Bug 21849: Don't allow SSL key logging.
    
    Bug 31457: disable per-installation profiles
    
    The dedicated profiles (per-installation) feature does not interact
    well with our bundled profiles on Linux and Windows, and it also causes
    multiple profiles to be created on macOS under TorBrowser-Data.
    
    Bug 31935: Disable profile downgrade protection.
    
    Since Tor Browser does not support more than one profile, disable
    the prompt and associated code that offers to create one when a
    version downgrade situation is detected.
    
    Bug 32493: Disable MOZ_SERVICES_HEALTHREPORT
    
    Bug 25741 - TBA: Disable features at compile-time
    
    MOZ_NATIVE_DEVICES for casting and the media player
    MOZ_TELEMETRY_REPORTING for telemetry
    MOZ_DATA_REPORTING for all data reporting preferences (crashreport, telemetry, geo)
    
    Bug 25741 - TBA: Add default configure options in dedicated file
    
    Define MOZ_ANDROID_NETWORK_STATE and MOZ_ANDROID_LOCATION
    
    Bug 29859: Disable HLS support for now
    
    Add --disable-tor-launcher build option
    
    Add --enable-tor-browser-update build option
    
    Bug 33734: Set MOZ_NORMANDY to False
    
    Bug 33851: Omit Parental Controls.
    
    Bug 40061: Omit the Windows default browser agent from the build
    
    Bug 40107: Adapt .mozconfig-asan for ESR 78
    
    Bug 40252: Add --enable-rust-simd to our tor-browser mozconfig files
    
    Bug 40793: moved Tor configuration options from old-configure.in to moz.configure
    1e8f6720
  • henry's avatar
    Bug 41340: Enable TOR_BROWSER_NIGHTLY_BUILD features for dev and nightly builds · f1f986e2
    henry authored
    #41285: Enable fluent warnings.
    f1f986e2
  • Pier Angelo Vendrame's avatar
    Bug 40562: Added Tor Browser preferences to 000-tor-browser.js · 70c1a71e
    Pier Angelo Vendrame authored
    Before reordering patches, we used to keep the Tor-related patches
    (torbutton and tor-launcher) at the beginning.
    After that issue, we decided to move them towards the end.
    
    In addition to that, we have decided to move Tor Browser-only
    preferences there, too, to make Base Browser-only fixups easier to
    apply.
    70c1a71e
  • Kathleen Brade's avatar
    Bug 13252: Do not store data in the app bundle · fd5cb70e
    Kathleen Brade authored
    When --enable-tor-browser-data-outside-app-dir is enabled,
    all user data is stored in a directory named
    TorBrowser-Data which is located next to the application directory.
    
    Display an informative error message if the TorBrowser-Data
    directory cannot be created due to an "access denied" or a
    "read only volume" error.
    
    On Mac OS, add support for the --invisible command line option which
    is used by the meek-http-helper to avoid showing an icon for the
    helper browser on the dock.
    fd5cb70e
  • Pier Angelo Vendrame's avatar
    b5babfee
  • Richard Pospesel's avatar
    Bug 40597: Implement TorSettings module · de99682d
    Richard Pospesel authored
    - migrated in-page settings read/write implementation from about:preferences#tor
      to the TorSettings module
    - TorSettings initially loads settings from the tor daemon, and saves them to
      firefox prefs
    - TorSettings notifies observers when a setting has changed; currently only
      QuickStart notification is implemented for parity with previous preference
      notify logic in about:torconnect and about:preferences#tor
    - about:preferences#tor, and about:torconnect now read and write settings
      thorugh the TorSettings module
    - all tor settings live in the torbrowser.settings.* preference branch
    - removed unused pref modify permission for about:torconnect content page from
      AsyncPrefs.jsm
    
    Bug 40645: Migrate Moat APIs to Moat.jsm module
    de99682d
  • Alex Catarineu's avatar
    Bug 10760: Integrate TorButton to TorBrowser core · fc894e21
    Alex Catarineu authored
    Because of the non-restartless nature of Torbutton, it required
    a two-stage installation process. On mobile, it was a problem,
    because it was not loading when the user opened the browser for
    the first time.
    
    Moving it to tor-browser and making it a system extension allows it
    to load when the user opens the browser for first time.
    
    Additionally, this patch also fixes Bug 27611.
    
    Bug 26321: New Circuit and New Identity menu items
    
    Bug 14392: Make about:tor behave like other initial pages.
    
    Bug 25013: Add torbutton as a tor-browser submodule
    
    Bug 31575: Replace Firefox Home (newtab) with about:tor
    
    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.
    fc894e21
  • ma1's avatar
    0795c1f4
  • Amogh Pradeep's avatar
    Orfox: Centralized proxy applied to AbstractCommunicator and BaseResources. · 0a59ce83
    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
    0a59ce83
  • Alex Catarineu's avatar
    Add TorStrings module for localization · 7944c269
    Alex Catarineu authored
    7944c269
  • Kathleen Brade's avatar
    Bug 14631: Improve profile access error messages. · 767365ab
    Kathleen Brade authored
    Instead of always reporting that the profile is locked, display specific
    messages for "access denied" and "read-only file system".
    
    To allow for localization, get profile-related error strings from Torbutton.
    Use app display name ("Tor Browser") in profile-related error alerts.
    767365ab
  • sanketh's avatar
    Bug 40209: Implement Basic Crypto Safety · cfb3d1e4
    sanketh authored
    Adds a CryptoSafety actor which detects when you've copied a crypto
    address from a HTTP webpage and shows a warning.
    
    Closes #40209.
    
    Bug 40428: Fix string attribute names
    cfb3d1e4
  • Kathleen Brade's avatar
    Bug 19273: Avoid JavaScript patching of the external app helper dialog. · c6a86885
    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
    c6a86885
  • Pier Angelo Vendrame's avatar
    08005067
  • Richard Pospesel's avatar
    Bug 31286: Implementation of bridge, proxy, and firewall settings in about:preferences#connection · 91b4fdf8
    Richard Pospesel authored
    This patch adds a new about:preferences#connection 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
    
    Bug 40774: Update about:preferences page to match new UI designs
    91b4fdf8
  • Richard Pospesel's avatar
    Bug 27476: Implement about:torconnect captive portal within Tor Browser · a598b057
    Richard Pospesel authored
    - implements new about:torconnect page as tor-launcher replacement
    - adds tor connection status to url bar and tweaks UX when not online
    - adds new torconnect component to browser
    - tor process management functionality remains implemented in tor-launcher through the TorProtocolService module
    - adds warning/error box to about:preferences#tor when not connected to tor
    - explicitly allows about:torconnect URIs to ignore Resist Fingerprinting (RFP)
    - various tweaks to info-pages.inc.css for about:torconnect (also affects other firefox info pages)
    
    Bug 40773: Update the about:torconnect frontend page to match additional UI flows
    a598b057
  • Arthur Edelstein's avatar
    Bug 12620: TorBrowser regression tests · 814475bf
    Arthur Edelstein authored
    Regression tests for Bug #2950: Make Permissions Manager memory-only
    
    Regression tests for TB4: Tor Browser's Firefox preference overrides.
    
    Note: many more functional tests could be made here
    
    Regression tests for #2874: Block Components.interfaces from content
    
    Bug 18923: Add a script to run all Tor Browser specific tests
    
    Regression tests for Bug #16441: Suppress "Reset Tor Browser" prompt.
    814475bf
  • Kathleen Brade's avatar
    Bug 4234: Use the Firefox Update Process for Tor Browser. · 455c5291
    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 Browser
    version changed (even if the Firefox version and build ID did
    not change), e.g., after a minor Tor Browser update.
    
    Also fix 32616: Disable GetSecureOutputDirectoryPath() functionality.
    
    Bug 26048: potentially confusing "restart to update" message
    
    Within the update doorhanger, remove the misleading message that mentions
    that windows will be restored after an update is applied, and replace the
    "Restart and Restore" button label with an existing
    "Restart to update Tor Browser" string.
    
    Bug 28885: notify users that update is downloading
    
    Add a "Downloading Tor Browser update" item which appears in the
    hamburger (app) menu while the update service is downloading a MAR
    file. Before this change, the browser did not indicate to the user
    that an update was in progress, which is especially confusing in
    Tor Browser because downloads often take some time. If the user
    clicks on the new menu item, the about dialog is opened to allow
    the user to see download progress.
    
    As part of this fix, the update service was changed to always show
    update-related messages in the hamburger menu, even if the update
    was started in the foreground via the about dialog or via the
    "Check for Tor Browser Update" toolbar menu item. This change is
    consistent with the Tor Browser goal of making sure users are
    informed about the update process.
    
    Removed #28885 parts of this patch which have been uplifted to Firefox.
    455c5291
  • Kathleen Brade's avatar
    Bug 13379: Sign our MAR files. · 5d621939
    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.
    
    Bug 19121: reinstate the update.xml hash check
    
    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.
    5d621939
  • Kathleen Brade's avatar
    Bug 16940: After update, load local change notes. · 3e1e97ca
    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.
    3e1e97ca
  • Georg Koppen's avatar
    Bug 32658: Create a new MAR signing key · 8506b577
    Georg Koppen authored
    It's time for our rotation again: Move the backup key in the front
    position and add a new backup key.
    
    Bug 33803: Move our primary nightly MAR signing key to tor-browser
    
    Bug 33803: Add a secondary nightly MAR signing key
    8506b577
  • Mike Perry's avatar
    Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing · f2547767
    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 redirected
    directly to the non-JS page. We adapt the search engine URLs
    accordingly.
    
    Also fixes bug 29798 by making sure we only specify the Google search
    engine we actually ship an .xml file for.
    
    Also regression tests.
    
    squash! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
    
    Bug 40494: Update Startpage search provider
    
    squash! Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
    
    Bug 40438: Add Blockchair as a search engine
    
    Bug 33342: Avoid disconnect search addon error after removal.
    
    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.
    f2547767
  • Richard Pospesel's avatar
    Bug 23247: Communicating security expectations for .onion · 8c1a2d3b
    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.
    8c1a2d3b
  • Kathleen Brade's avatar
    Bug 30237: Add v3 onion services client authentication prompt · 967f065a
    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 SOCKS errors (Tor proposal 304) to the
    socket transport and SOCKS layers. Improved display of all of these
    errors will be implemented as part of bug 30025.
    
    Also fixes bug 19757:
     Add a "Remember this key" checkbox to the client auth prompt.
    
     Add an "Onion Services Authentication" section within the
     about:preferences "Privacy & Security section" to allow
     viewing and removal of v3 onion client auth keys that have
     been stored on disk.
    
    Also fixes bug 19251: use enhanced error pages for onion service errors.
    967f065a
  • Alex Catarineu's avatar
    Bug 21952: Implement Onion-Location · b9b791d5
    Alex Catarineu authored
    Whenever a valid Onion-Location HTTP header (or corresponding HTML
    <meta> http-equiv attribute) is found in a document load, we either
    redirect to it (if the user opted-in via preference) or notify the
    presence of an onionsite alternative with a badge in the urlbar.
    b9b791d5
  • Pier Angelo Vendrame's avatar
    Bug 40458: Implement .tor.onion aliases · fad1a632
    Pier Angelo Vendrame authored
    We have enabled HTTPS-Only mode, therefore we do not need
    HTTPS-Everywhere anymore.
    However, we want to keep supporting .tor.onion aliases (especially for
    securedrop).
    Therefore, in this patch we implemented the parsing of HTTPS-Everywhere
    rulesets, and the redirect of .tor.onion domains.
    Actually, Tor Browser believes they are actual domains. We change them
    on the fly on the SOCKS proxy requests to resolve the domain, and on
    the code that verifies HTTPS certificates.
    fad1a632
  • Pier Angelo Vendrame's avatar
    Bug 11698: Incorporate Tor Browser Manual pages into Tor Browser · 68e1e05e
    Pier Angelo Vendrame authored
    This patch associates the about:manual page to a translated page that
    must be injected to browser/omni.ja after the build.
    The content must be placed in chrome/browser/content/browser/manual/, so
    that is then available at chrome://browser/content/manual/.
    We preferred giving absolute freedom to the web team, rather than having
    to change the patch in case of changes on the documentation.
    68e1e05e
  • Pier Angelo Vendrame's avatar
    Bug 41435: Add a Tor Browser migration function · bd46b8bd
    Pier Angelo Vendrame authored
    For now this function only deletes old language packs for which we are
    already packaging the strings with the application.
    bd46b8bd
  • p13dz's avatar
    Bug 40283: Workaround for the file upload bug · 6cf333b1
    p13dz authored
    (cherry picked from commit c23f2f39)
    6cf333b1
Showing
with 802 additions and 29 deletions
......@@ -193,3 +193,6 @@ config/external/icu4x
# Ignore Storybook generated files
browser/components/storybook/node_modules/
browser/components/storybook/storybook-static/
# Ignore binary base of tor browser
.binaries
// Copyright (c) 2020, The Tor Project, Inc.
// See LICENSE for licensing information.
//
// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
var EXPORTED_SYMBOLS = ["AboutTBUpdateChild"];
const { RemotePageChild } = ChromeUtils.import(
"resource://gre/actors/RemotePageChild.jsm"
);
class AboutTBUpdateChild extends RemotePageChild {}
// Copyright (c) 2020, The Tor Project, Inc.
// See LICENSE for licensing information.
//
// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
"use strict";
this.EXPORTED_SYMBOLS = ["AboutTBUpdateParent"];
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const { AppConstants } = ChromeUtils.import(
"resource://gre/modules/AppConstants.jsm"
);
const kRequestUpdateMessageName = "FetchUpdateData";
/**
* This code provides services to the about:tbupdate page. Whenever
* about:tbupdate needs to do something chrome-privileged, it sends a
* message that's handled here. It is modeled after Mozilla's about:home
* implementation.
*/
class AboutTBUpdateParent extends JSWindowActorParent {
async receiveMessage(aMessage) {
if (aMessage.name == kRequestUpdateMessageName) {
return this.getReleaseNoteInfo();
}
return undefined;
}
get moreInfoURL() {
try {
return Services.prefs.getCharPref("torbrowser.post_update.url");
} catch (e) {}
// Use the default URL as a fallback.
return Services.urlFormatter.formatURLPref("startup.homepage_override_url");
}
// Read the text from the beginning of the changelog file that is located
// at TorBrowser/Docs/ChangeLog.txt and return an object that contains
// the following properties:
// version e.g., Tor Browser 8.5
// releaseDate e.g., March 31 2019
// releaseNotes details of changes (lines 2 - end of ChangeLog.txt)
// We attempt to parse the first line of ChangeLog.txt to extract the
// version and releaseDate. If parsing fails, we return the entire first
// line in version and omit releaseDate.
//
// On Mac OS, when building with --enable-tor-browser-data-outside-app-dir
// to support Gatekeeper signing, the ChangeLog.txt file is located in
// TorBrowser.app/Contents/Resources/TorBrowser/Docs/.
async getReleaseNoteInfo() {
let info = { moreInfoURL: this.moreInfoURL };
try {
let f;
if (AppConstants.TOR_BROWSER_DATA_OUTSIDE_APP_DIR) {
// "XREExeF".parent is the directory that contains firefox, i.e.,
// Browser/ or, on Mac OS, TorBrowser.app/Contents/MacOS/.
f = Services.dirsvc.get("XREExeF", Ci.nsIFile).parent;
if (AppConstants.platform === "macosx") {
f = f.parent;
f.append("Resources");
}
f.append("TorBrowser");
} else {
// "DefProfRt" is .../TorBrowser/Data/Browser
f = Services.dirsvc.get("DefProfRt", Ci.nsIFile);
f = f.parent.parent; // Remove "Data/Browser"
}
f.append("Docs");
f.append("ChangeLog.txt");
// NOTE: We load in the entire file, but only use the first few lines
// before the first blank line.
const logLines = (await IOUtils.readUTF8(f.path))
.replace(/\n\r?\n.*/ms, "")
.split(/\n\r?/);
// Read the first line to get the version and date.
// Assume everything after the last "-" is the date.
const firstLine = logLines.shift();
const match = firstLine?.match(/(.*)-+(.*)/);
if (match) {
info.version = match[1].trim();
info.releaseDate = match[2].trim();
} else {
// No date.
info.version = firstLine?.trim();
}
// We want to read the rest of the release notes as a tree. Each entry
// will contain the text for that line.
// We choose a negative index for the top node of this tree to ensure no
// line will appear less indented.
const topEntry = { indent: -1, children: undefined };
let prevEntry = topEntry;
for (let line of logLines) {
const indent = line.match(/^ */)[0];
line = line.trim();
if (line.startsWith("*")) {
// Treat as a bullet point.
let entry = {
text: line.replace(/^\*\s/, ""),
indent: indent.length,
};
let parentEntry;
if (entry.indent > prevEntry.indent) {
// A sub-list of the previous item.
prevEntry.children = [];
parentEntry = prevEntry;
} else {
// Same list or end of sub-list.
// Search for the first parent whose indent comes before ours.
parentEntry = prevEntry.parent;
while (entry.indent <= parentEntry.indent) {
parentEntry = parentEntry.parent;
}
}
entry.parent = parentEntry;
parentEntry.children.push(entry);
prevEntry = entry;
} else if (prevEntry === topEntry) {
// Unexpected, missing bullet point on first line.
// Place as its own bullet point instead, and set as prevEntry for the
// next loop.
prevEntry = { text: line, indent: indent.length, parent: topEntry };
topEntry.children = [prevEntry];
} else {
// Append to the previous bullet point.
prevEntry.text += ` ${line}`;
}
}
info.releaseNotes = topEntry.children;
} catch (e) {
Cu.reportError(e);
}
return info;
}
}
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* Copyright (c) 2020, The Tor Project, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CryptoSafetyChild"];
const { Bech32Decode } = ChromeUtils.import(
"resource://gre/modules/Bech32Decode.jsm"
);
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
const kPrefCryptoSafety = "security.cryptoSafety";
XPCOMUtils.defineLazyPreferenceGetter(
this,
"isCryptoSafetyEnabled",
kPrefCryptoSafety,
true /* defaults to true */
);
function looksLikeCryptoAddress(s) {
// P2PKH and P2SH addresses
// https://stackoverflow.com/a/24205650
const bitcoinAddr = /^[13][a-km-zA-HJ-NP-Z1-9]{25,39}$/;
if (bitcoinAddr.test(s)) {
return true;
}
// Bech32 addresses
if (Bech32Decode(s) !== null) {
return true;
}
// regular addresses
const etherAddr = /^0x[a-fA-F0-9]{40}$/;
if (etherAddr.test(s)) {
return true;
}
// t-addresses
// https://www.reddit.com/r/zec/comments/8mxj6x/simple_regex_to_validate_a_zcash_tz_address/dzr62p5/
const zcashAddr = /^t1[a-zA-Z0-9]{33}$/;
if (zcashAddr.test(s)) {
return true;
}
// Standard, Integrated, and 256-bit Integrated addresses
// https://monero.stackexchange.com/a/10627
const moneroAddr = /^4(?:[0-9AB]|[1-9A-HJ-NP-Za-km-z]{12}(?:[1-9A-HJ-NP-Za-km-z]{30})?)[1-9A-HJ-NP-Za-km-z]{93}$/;
if (moneroAddr.test(s)) {
return true;
}
return false;
}
class CryptoSafetyChild extends JSWindowActorChild {
handleEvent(event) {
if (isCryptoSafetyEnabled) {
// Ignore non-HTTP addresses
if (!this.document.documentURIObject.schemeIs("http")) {
return;
}
// Ignore onion addresses
if (this.document.documentURIObject.host.endsWith(".onion")) {
return;
}
if (event.type == "copy" || event.type == "cut") {
this.contentWindow.navigator.clipboard.readText().then(clipText => {
const selection = clipText.replace(/\s+/g, "");
if (looksLikeCryptoAddress(selection)) {
this.sendAsyncMessage("CryptoSafety:CopiedText", {
selection,
});
}
});
}
}
}
}
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* Copyright (c) 2020, The Tor Project, Inc.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
var EXPORTED_SYMBOLS = ["CryptoSafetyParent"];
const { XPCOMUtils } = ChromeUtils.import(
"resource://gre/modules/XPCOMUtils.jsm"
);
XPCOMUtils.defineLazyModuleGetters(this, {
TorStrings: "resource:///modules/TorStrings.jsm",
});
const kPrefCryptoSafety = "security.cryptoSafety";
XPCOMUtils.defineLazyPreferenceGetter(
this,
"isCryptoSafetyEnabled",
kPrefCryptoSafety,
true /* defaults to true */
);
class CryptoSafetyParent extends JSWindowActorParent {
getBrowser() {
return this.browsingContext.top.embedderElement;
}
receiveMessage(aMessage) {
if (isCryptoSafetyEnabled) {
if (aMessage.name == "CryptoSafety:CopiedText") {
showPopup(this.getBrowser(), aMessage.data.selection);
}
}
}
}
function trimAddress(cryptoAddr) {
if (cryptoAddr.length <= 32) {
return cryptoAddr;
}
return cryptoAddr.substring(0, 32) + "...";
}
function showPopup(aBrowser, cryptoAddr) {
const chromeDoc = aBrowser.ownerDocument;
if (chromeDoc) {
const win = chromeDoc.defaultView;
const cryptoSafetyPrompt = new CryptoSafetyPrompt(
aBrowser,
win,
cryptoAddr
);
cryptoSafetyPrompt.show();
}
}
class CryptoSafetyPrompt {
constructor(aBrowser, aWin, cryptoAddr) {
this._browser = aBrowser;
this._win = aWin;
this._cryptoAddr = cryptoAddr;
}
show() {
const primaryAction = {
label: TorStrings.cryptoSafetyPrompt.primaryAction,
accessKey: TorStrings.cryptoSafetyPrompt.primaryActionAccessKey,
callback: () => {
this._win.torbutton_new_circuit();
},
};
const secondaryAction = {
label: TorStrings.cryptoSafetyPrompt.secondaryAction,
accessKey: TorStrings.cryptoSafetyPrompt.secondaryActionAccessKey,
callback: () => {},
};
let _this = this;
const options = {
popupIconURL: "chrome://global/skin/icons/warning.svg",
eventCallback(aTopic) {
if (aTopic === "showing") {
_this._onPromptShowing();
}
},
};
const cryptoWarningText = TorStrings.cryptoSafetyPrompt.cryptoWarning.replace(
"%S",
trimAddress(this._cryptoAddr)
);
if (this._win.PopupNotifications) {
this._prompt = this._win.PopupNotifications.show(
this._browser,
"crypto-safety-warning",
cryptoWarningText,
null /* anchor ID */,
primaryAction,
[secondaryAction],
options
);
}
}
_onPromptShowing() {
let xulDoc = this._browser.ownerDocument;
let whatCanHeading = xulDoc.getElementById(
"crypto-safety-warning-notification-what-can-heading"
);
if (whatCanHeading) {
whatCanHeading.textContent = TorStrings.cryptoSafetyPrompt.whatCanHeading;
}
let whatCanBody = xulDoc.getElementById(
"crypto-safety-warning-notification-what-can-body"
);
if (whatCanBody) {
whatCanBody.textContent = TorStrings.cryptoSafetyPrompt.whatCanBody;
}
let learnMoreElem = xulDoc.getElementById(
"crypto-safety-warning-notification-learnmore"
);
if (learnMoreElem) {
learnMoreElem.setAttribute(
"value",
TorStrings.cryptoSafetyPrompt.learnMore
);
learnMoreElem.setAttribute(
"href",
TorStrings.cryptoSafetyPrompt.learnMoreURL
);
}
}
}
......@@ -13,6 +13,8 @@ const { RemotePageChild } = ChromeUtils.import(
"resource://gre/actors/RemotePageChild.jsm"
);
const { TorStrings } = ChromeUtils.import("resource:///modules/TorStrings.jsm");
XPCOMUtils.defineLazyServiceGetter(
this,
"gSerializationHelper",
......@@ -32,6 +34,7 @@ class NetErrorChild extends RemotePageChild {
"RPMAddToHistogram",
"RPMRecordTelemetryEvent",
"RPMGetHttpResponseHeader",
"RPMGetTorStrings",
];
this.exportFunctions(exportableFunctions);
}
......@@ -110,4 +113,8 @@ class NetErrorChild extends RemotePageChild {
return "";
}
RPMGetTorStrings() {
return Cu.cloneInto(TorStrings.onionServices, this.contentWindow);
}
}
......@@ -18,6 +18,8 @@ const { TelemetryController } = ChromeUtils.import(
"resource://gre/modules/TelemetryController.jsm"
);
const { TorConnect } = ChromeUtils.import("resource:///modules/TorConnect.jsm");
const PREF_SSL_IMPACT_ROOTS = [
"security.tls.version.",
"security.ssl3.",
......@@ -341,6 +343,10 @@ class NetErrorParent extends JSWindowActorParent {
break;
}
}
break;
case "ShouldShowTorConnect":
return TorConnect.shouldShowTorConnect;
}
return undefined;
}
}
......@@ -57,6 +57,8 @@ FINAL_TARGET_FILES.actors += [
"ContentSearchParent.jsm",
"ContextMenuChild.jsm",
"ContextMenuParent.jsm",
"CryptoSafetyChild.jsm",
"CryptoSafetyParent.jsm",
"DecoderDoctorChild.jsm",
"DecoderDoctorParent.jsm",
"DOMFullscreenChild.jsm",
......@@ -93,3 +95,9 @@ FINAL_TARGET_FILES.actors += [
BROWSER_CHROME_MANIFESTS += [
"test/browser/browser.ini",
]
if CONFIG["TOR_BROWSER_UPDATE"]:
FINAL_TARGET_FILES.actors += [
"AboutTBUpdateChild.jsm",
"AboutTBUpdateParent.jsm",
]
......@@ -97,10 +97,12 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS-
rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(dist_dest)/Contents/MacOS'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/firefox.icns '$(dist_dest)/Contents/Resources/firefox.icns'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/document.icns '$(dist_dest)/Contents/Resources/document.icns'
ifndef TOR_BROWSER_UPDATE
$(MKDIR) -p '$(dist_dest)/Contents/Library/LaunchServices'
ifdef MOZ_UPDATER
mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
endif
printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo'
endif
printf APPLTORB > '$(dist_dest)/Contents/PkgInfo'
endif
......@@ -179,7 +179,7 @@
<key>CFBundleShortVersionString</key>
<string>@APP_VERSION@</string>
<key>CFBundleSignature</key>
<string>MOZB</string>
<string>TORB</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
......
......@@ -6,3 +6,8 @@
# * permission is an integer between 1 and 15
# Permissions defined here will also be set for private browsing.
# See PermissionManager.cpp for more...
# UITour
# DuckDuckGo .onion (used for circuit display onboarding).
origin uitour 1 https://duckduckgogg42xjoc72x3sjasowoarfbgcmvfimaftt6twagswzczad.onion/
origin uitour 1 about:tor
#include 001-base-profile.js
pref("app.update.notifyDuringDownload", true);
pref("app.update.url.manual", "https://www.torproject.org/download/languages/");
pref("app.update.url.details", "https://www.torproject.org/download/");
pref("app.update.badgeWaitTime", 0);
pref("app.releaseNotesURL", "about:blank");
// disables the 'What's New?' link in the about dialog, otherwise we need to
// duplicate logic for generating the url to the blog post that is already more
// easily found in about:tor
pref("app.releaseNotesURL.aboutDialog", "about:blank");
// point to our feedback url rather than Mozilla's
pref("app.feedback.baseURL", "https://support.torproject.org/%LOCALE%/get-in-touch/");
pref("browser.shell.checkDefaultBrowser", false);
// Proxy and proxy security
pref("network.proxy.socks", "127.0.0.1");
pref("network.proxy.socks_port", 9150);
pref("network.proxy.socks_remote_dns", true);
pref("network.proxy.no_proxies_on", ""); // For fingerprinting and local service vulns (#10419)
pref("network.proxy.allow_hijacking_localhost", true); // Allow proxies for localhost (#31065)
pref("network.proxy.type", 1);
// Bug 40548: Disable proxy-bypass
pref("network.proxy.failover_direct", false);
// localhost is already blocked by setting `network.proxy.allow_hijacking_localhost` to
// true, allowing users to explicitly block ports makes them fingerprintable; for details, see
// Bug 41317: Tor Browser leaks banned ports in network.security.ports.banned
pref("network.security.ports.banned", "", locked);
pref("network.dns.disabled", true); // This should cover the #5741 patch for DNS leaks
pref("network.http.max-persistent-connections-per-proxy", 256);
pref("browser.uiCustomization.state", "{\"placements\":{\"widget-overflow-fixed-list\":[],\"PersonalToolbar\":[\"personal-bookmarks\"],\"nav-bar\":[\"back-button\",\"forward-button\",\"stop-reload-button\",\"urlbar-container\",\"torbutton-button\",\"security-level-button\",\"new-identity-button\",\"downloads-button\"],\"TabsToolbar\":[\"tabbrowser-tabs\",\"new-tab-button\",\"alltabs-button\"],\"toolbar-menubar\":[\"menubar-items\"],\"PanelUI-contents\":[\"home-button\",\"edit-controls\",\"zoom-controls\",\"new-window-button\",\"save-page-button\",\"print-button\",\"bookmarks-menu-button\",\"history-panelmenu\",\"find-button\",\"preferences-button\",\"add-ons-button\",\"developer-button\"],\"addon-bar\":[\"addonbar-closebutton\",\"status-bar\"]},\"seen\":[\"developer-button\",\"_73a6fe31-595d-460b-a920-fcc0f8843232_-browser-action\"],\"dirtyAreaCache\":[\"PersonalToolbar\",\"nav-bar\",\"TabsToolbar\",\"toolbar-menubar\"],\"currentVersion\":14,\"newElementCount\":1}");
// Treat .onions as secure
pref("dom.securecontext.allowlist_onions", true);
// Disable HTTPS-Only mode for .onion domains (tor-browser#19850)
pref("dom.security.https_only_mode.upgrade_onion", false);
// tor-browser#22320: Hide referer when comming from a .onion address
pref("network.http.referer.hideOnionSource", true);
// Bug 40423/41137: Disable http/3
// We should re-enable it as soon as Tor gets UDP support
pref("network.http.http3.enabled", false);
// 0 = do not use a second connection, see all.js and #7656
pref("network.http.connection-retry-timeout", 0);
#expand pref("torbrowser.version", __TOR_BROWSER_VERSION_QUOTED__);
// Old torbutton prefs
// debug prefs
pref("extensions.torbutton.loglevel", 4);
pref("extensions.torbutton.logmethod", 1); // 0=stdout, 1=errorconsole, 2=debuglog
// Display prefs
pref("extensions.torbutton.display_circuit", true);
// Tor check and proxy prefs
pref("extensions.torbutton.test_enabled", true);
pref("extensions.torbutton.test_url", "https://check.torproject.org/?TorButton=true");
pref("extensions.torbutton.local_tor_check", true);
pref("extensions.torbutton.use_nontor_proxy", false);
// State prefs:
pref("extensions.torbutton.startup", false);
// This is only used when letterboxing is disabled.
// See #7255 for details. We display the warning three times to make sure the
// user did not click on it by accident.
pref("extensions.torbutton.maximize_warnings_remaining", 3);
// Security prefs:
pref("extensions.torbutton.resize_new_windows", false);
pref("extensions.torbutton.launch_warning", true);
// Browser home page:
pref("browser.startup.homepage", "about:tor");
// This pref specifies an ad-hoc "version" for various pref update hacks we need to do
pref("extensions.torbutton.pref_fixup_version", 0);
// Formerly tor-launcher defaults
// When presenting the setup wizard, first prompt for locale.
pref("intl.locale.matchOS", true);
pref("extensions.torlauncher.prompt_for_locale", true);
pref("extensions.torlauncher.start_tor", true);
pref("extensions.torlauncher.prompt_at_startup", true);
pref("extensions.torlauncher.quickstart", false);
pref("extensions.torlauncher.loglevel", 4); // 1=verbose, 2=debug, 3=info, 4=note, 5=warn
pref("extensions.torlauncher.logmethod", 1); // 0=stdout, 1=errorconsole, 2=debuglog
pref("extensions.torlauncher.max_tor_log_entries", 1000);
// By default, Tor Launcher configures a TCP listener for the Tor
// control port, as defined by control_host and control_port.
// Set control_port_use_ipc to true to use an IPC object (e.g., a Unix
// domain socket) instead. You may also modify control_ipc_path to
// override the default IPC object location. If a relative path is used,
// it is handled like torrc_path (see below).
pref("extensions.torlauncher.control_host", "127.0.0.1");
pref("extensions.torlauncher.control_port", 9151);
pref("extensions.torlauncher.control_port_use_ipc", false);
pref("extensions.torlauncher.control_ipc_path", "");
// By default, Tor Launcher configures a TCP listener for the Tor
// SOCKS port. The host is taken from the network.proxy.socks pref and
// the port is taken from the network.proxy.socks_port pref.
// Set socks_port_use_ipc to true to use an IPC object (e.g., a Unix
// domain socket) instead. You may also modify socks_ipc_path to
// override the default IPC object location. If a relative path is used,
// it is handled like torrc_path (see below).
// Modify socks_port_flags to use a different set of SocksPort flags (but be
// careful).
pref("extensions.torlauncher.socks_port_use_ipc", false);
pref("extensions.torlauncher.socks_ipc_path", "");
pref("extensions.torlauncher.socks_port_flags", "ExtendedErrors IPv6Traffic PreferIPv6 KeepAliveIsolateSOCKSAuth");
// The tor_path is relative to the application directory. On Linux and
// Windows this is the Browser/ directory that contains the firefox
// executables, and on Mac OS it is the TorBrowser.app directory.
pref("extensions.torlauncher.tor_path", "");
// The torrc_path and tordatadir_path are relative to the data directory,
// which is TorBrowser-Data/ if it exists as a sibling of the application
// directory. If TorBrowser-Data/ does not exist, these paths are relative
// to the TorBrowser/ directory within the application directory.
pref("extensions.torlauncher.torrc_path", "");
pref("extensions.torlauncher.tordatadir_path", "");
// BridgeDB-related preferences (used for Moat).
pref("extensions.torlauncher.bridgedb_front", "cdn.sstatic.net");
pref("extensions.torlauncher.bridgedb_reflector", "https://moat.torproject.org.global.prod.fastly.net/");
pref("extensions.torlauncher.moat_service", "https://bridges.torproject.org/moat");
pref("extensions.torlauncher.bridgedb_bridge_type", "obfs4");
// Recommended default bridge type (can be set per localized bundle).
// pref("extensions.torlauncher.default_bridge_recommended_type", "obfs3");
// Default bridges.
// pref("extensions.torlauncher.default_bridge.TYPE.1", "TYPE x.x.x.x:yy");
// pref("extensions.torlauncher.default_bridge.TYPE.2", "TYPE x.x.x.x:yy");
......@@ -455,6 +455,12 @@ pref("browser.urlbar.suggest.topsites", false);
// is only reported via telemetry (which is disabled). See tor-browser#40048.
pref("corroborator.enabled", false);
// Onboarding.
pref("browser.onboarding.tourset-version", 5);
pref("browser.onboarding.newtour", "welcome,privacy,tor-network-9.0,circuit-display,security,expect-differences,onion-services,learn-more");
pref("browser.onboarding.updatetour", "learn-more");
pref("browser.onboarding.skip-tour-button.hide", true);
// prefs to disable jump-list entries in the taskbar on Windows (see bug #12885)
#ifdef XP_WIN
// this pref changes the app's set AUMID to be dependent on the profile path, rather than
......
......@@ -140,14 +140,8 @@ pref("app.update.elevation.promptMaxAttempts", 2);
pref("app.update.notifyDuringDownload", false);
// If set to true, the Update Service will automatically download updates if the
// user can apply updates. This pref is no longer used on Windows, except as the
// default value to migrate to the new location that this data is now stored
// (which is in a file in the update directory). Because of this, this pref
// should no longer be used directly. Instead, getAppUpdateAutoEnabled and
// getAppUpdateAutoEnabled from UpdateUtils.jsm should be used.
#ifndef XP_WIN
pref("app.update.auto", true);
#endif
// user can apply updates.
pref("app.update.auto", true);
// If set to true, the Update Service will apply updates in the background
// when it finishes downloading them.
......@@ -2156,6 +2150,22 @@ pref("browser.sessionstore.restore_tabs_lazily", true);
pref("browser.suppress_first_window_animation", true);
// Preferences for Photon onboarding system extension
pref("browser.onboarding.enabled", true);
// Mark this as an upgraded profile so we don't offer the initial new user onboarding tour.
pref("browser.onboarding.tourset-version", 2);
pref("browser.onboarding.state", "default");
// On the Activity-Stream page, the snippet's position overlaps with our notification.
// So use `browser.onboarding.notification.finished` to let the AS page know
// if our notification is finished and safe to show their snippet.
pref("browser.onboarding.notification.finished", false);
pref("browser.onboarding.notification.mute-duration-on-first-session-ms", 300000); // 5 mins
pref("browser.onboarding.notification.max-life-time-per-tour-ms", 432000000); // 5 days
pref("browser.onboarding.notification.max-life-time-all-tours-ms", 1209600000); // 14 days
pref("browser.onboarding.notification.max-prompt-count-per-tour", 8);
pref("browser.onboarding.newtour", "performance,private,screenshots,addons,customize,default");
pref("browser.onboarding.updatetour", "performance,library,screenshots,singlesearch,customize,sync");
// Preference that allows individual users to disable Screenshots.
pref("extensions.screenshots.disabled", false);
......
......@@ -174,7 +174,7 @@ appUpdater.prototype = {
if (aChildID == "downloadAndInstall") {
let updateVersion = gAppUpdater.update.displayVersion;
// Include the build ID if this is an "a#" (nightly or aurora) build
if (/a\d+$/.test(updateVersion)) {
if (!AppConstants.TOR_BROWSER_UPDATE && /a\d+$/.test(updateVersion)) {
let buildID = gAppUpdater.update.buildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
......
......@@ -54,15 +54,15 @@ async function init(aEvent) {
bits: Services.appinfo.is64Bit ? 64 : 32,
};
// Adjust version text to show the Tor Browser version
versionAttributes.version =
AppConstants.TOR_BROWSER_VERSION +
" (based on Mozilla Firefox " +
AppConstants.MOZ_APP_VERSION_DISPLAY +
")";
let version = Services.appinfo.version;
if (/a\d+$/.test(version)) {
versionId = "aboutDialog-version-nightly";
let buildID = Services.appinfo.appBuildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
let day = buildID.slice(6, 8);
versionAttributes.isodate = `${year}-${month}-${day}`;
document.getElementById("experimental").hidden = false;
document.getElementById("communityDesc").hidden = true;
}
......
......@@ -7,6 +7,12 @@
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
<?xml-stylesheet href="chrome://torbutton/skin/aboutDialog.css" type="text/css"?>
<!-- We need to include the localization DTDs until we migrate to Fluent -->
<!DOCTYPE window [
#include browser-doctype.inc
]>
<window xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
......@@ -22,7 +28,7 @@
data-l10n-id="aboutDialog-title"
#endif
role="dialog"
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
aria-describedby="version distribution distributionId projectDesc helpDesc trademark trademarkTor"
>
#ifdef XP_MACOSX
#include macWindow.inc.xhtml
......@@ -140,24 +146,36 @@
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-exp-creditsLink"/>
</description>
</vbox>
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
<label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
<!-- Keep communityDesc and contributeDesc to avoid JS errors trying to hide them -->
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2" hidden="true"></description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus" hidden="true"></description>
<description class="text-blurb" id="projectDesc">
&project.start;
<label is="text-link" href="https://www.torproject.org/">
&project.tpoLink;
</label>&project.end;
</description>
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
<label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&#38;utm_medium=referral&#38;utm_campaign=firefox_about&#38;utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
<label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
<description class="text-blurb" id="helpDesc">
&help.start;
<label is="text-link" href="https://donate.torproject.org/">
&help.donateLink;
</label>
&help.or;
<label is="text-link" href="https://community.torproject.org/">
&help.getInvolvedLink;
</label>&help.end;
</description>
</vbox>
</vbox>
</hbox>
<vbox id="bottomBox">
<hbox pack="center">
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/>
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:rights" data-l10n-id="bottomLinks-rights"/>
<label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/?utm_source=firefox-browser&#38;utm_medium=firefox-desktop&#38;utm_campaign=about-dialog" data-l10n-id="bottomLinks-privacy"/>
<hbox id="newBottom" pack="center" position="1">
<label is="text-link" class="bottom-link" href="https://support.torproject.org/">&bottomLinks.questions;</label>
<label is="text-link" class="bottom-link" href="https://community.torproject.org/relay/">&bottomLinks.grow;</label>
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license">&bottomLinks.license;</label>
</hbox>
<description id="trademark" data-l10n-id="trademarkInfo"></description>
<description id="trademarkTor">&tor.TrademarkStatement;</description>
</vbox>
</vbox>
......
/*
* Copyright (c) 2019, The Tor Project, Inc.
* See LICENSE for licensing information.
*
* vim: set sw=2 sts=2 ts=8 et syntax=css:
*/
:root {
--abouttor-text-color: white;
--abouttor-bg-toron-color: #420C5D;
}
body {
font-family: Helvetica, Arial, sans-serif;
color: var(--abouttor-text-color);
background-color: var(--abouttor-bg-toron-color);
margin-block: 40px;
margin-inline: 50px;
display: grid;
grid-template-columns: auto auto;
align-items: baseline;
gap: 40px 50px;
}
body > *:not([hidden]) {
display: contents;
}
.label-column {
grid-column: 1;
}
.content {
grid-column: 2;
font-family: monospace;
line-height: 1.4;
}
.label-column, .content {
margin: 0;
padding: 0;
font-size: 1rem;
font-weight: normal;
}
a {
color: inherit;
}
.no-line-break {
white-space: nowrap;
}
ul {
padding-inline: 1em 0;
}
h3, h4 {
font-size: 1.1rem;
font-weight: bold;
}
h3.build-system-heading {
font-size: 1.5rem;
font-weight: normal;
margin-block-start: 3em;
}
// Copyright (c) 2020, The Tor Project, Inc.
// See LICENSE for licensing information.
//
// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
/* eslint-env mozilla/frame-script */
/**
* An object representing a bullet point in the release notes.
*
* typedef {Object} ReleaseBullet
* @property {string} text - The text for this bullet point.
* @property {?Array<ReleaseBullet>} children - A sub-list of bullet points.
*/
/**
* Fill an element with the given list of release bullet points.
*
* @param {Element} container - The element to fill with bullet points.
* @param {Array<ReleaseBullet>} bulletPoints - The list of bullet points.
* @param {string} [childTag="h3"] - The element tag name to use for direct
* children. Initially, the children are h3 sub-headings.
*/
function fillReleaseNotes(container, bulletPoints, childTag = "h3") {
for (const { text, children } of bulletPoints) {
const childEl = document.createElement(childTag);
// Keep dashes like "[tor-browser]" on the same line by nowrapping the word.
for (const [index, part] of text.split(/(\S+-\S+)/).entries()) {
if (!part) {
continue;
}
const span = document.createElement("span");
span.textContent = part;
span.classList.toggle("no-line-break", index % 2);
childEl.appendChild(span);
}
container.appendChild(childEl);
if (children) {
if (childTag == "h3" && text.toLowerCase() === "build system") {
// Special case: treat the "Build System" heading's children as
// sub-headings.
childEl.classList.add("build-system-heading");
fillReleaseNotes(container, children, "h4");
} else {
const listEl = document.createElement("ul");
fillReleaseNotes(listEl, children, "li");
if (childTag == "li") {
// Insert within the "li" element.
childEl.appendChild(listEl);
} else {
container.appendChild(listEl);
}
}
}
}
}
/**
* Set the content for the specified container, or hide it if we have no
* content.
*
* @template C
* @param {string} containerId - The id for the container.
* @param {?C} content - The content for this container, or a falsey value if
* the container has no content.
* @param {function(contentEl: Elemenet, content: C)} [fillContent] - A function
* to fill the ".content" contentEl with the given 'content'. If unspecified,
* the 'content' will become the contentEl's textContent.
*/
function setContent(containerId, content, fillContent) {
const container = document.getElementById(containerId);
if (!content) {
container.hidden = true;
return;
}
const contentEl = container.querySelector(".content");
// Release notes are only in English.
contentEl.setAttribute("lang", "en-US");
contentEl.setAttribute("dir", "ltr");
if (fillContent) {
fillContent(contentEl, content);
} else {
contentEl.textContent = content;
}
}
/**
* Callback when we receive the update details.
*
* @param {Object} aData - The update details.
* @param {?string} aData.version - The update version.
* @param {?string} aData.releaseDate - The release date.
* @param {?string} aData.moreInfoURL - A URL for more info.
* @param {?Array<ReleaseBullet>} aData.releaseNotes - Release notes as bullet
* points.
*/
function onUpdate(aData) {
setContent("version-row", aData.version);
setContent("releasedate-row", aData.releaseDate);
setContent("releasenotes", aData.releaseNotes, fillReleaseNotes);
if (aData.moreInfoURL) {
document.getElementById("infolink").setAttribute("href", aData.moreInfoURL);
} else {
document.getElementById("fullinfo").hidden = true;
}
}
RPMSendQuery("FetchUpdateData").then(onUpdate);