Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TorDisabled key doesn't appear to disable Tor in MacOS #17530

Closed
3jdp opened this issue Aug 17, 2021 · 3 comments · Fixed by brave/brave-core#9802
Closed

TorDisabled key doesn't appear to disable Tor in MacOS #17530

3jdp opened this issue Aug 17, 2021 · 3 comments · Fixed by brave/brave-core#9802

Comments

@3jdp
Copy link

3jdp commented Aug 17, 2021

Description

Hi-
Per this and other issue listings, the following should disable Tor in MacOS.

defaults write com.brave.Browser TorDisabled -integer 1

but it has no visible effect.

We are disallowing usage of Brave on Mac systems until we can disable this.

Steps to Reproduce

  1. Install Brave post-1.3
  2. Use defaults command above
  3. Launch Brave, choose File -> and examine items in that menu.

Actual result:

"New Private Window with Tor" is still there, and choosing that option opens a Tor window.

Expected result:

"New Private Window with Tor" should either not be present or greyed out.

Reproduces how often:

Easily reproduced in 1.28.105 (latest).

Brave version (brave://version info)

Brave 1.28.105 Chromium: 92.0.4515.131 (Official Build) (x86_64)
Revision 6b8d6c56ce21e38a72f7c4becb5abc1fa5134f29-refs/branch-heads/4515@{#1933}
OS macOS Version 10.15.7 (Build 19H1030)
JavaScript V8 9.2.230.22
User Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Command Line /Applications/Brave Browser.app/Contents/MacOS/Brave Browser --user-data-dir=/Users/MyUsername/Library/Application Support/BraveSoftware/Brave-Browser --enable-dom-distiller --disable-domain-reliability --no-pings --origin-trial-public-key=bYUKPJoPnCxeNvu72j4EmPuK7tr1PAC7SHh8ld9Mw3E=,fMS4mpO6buLQ/QMd+zJmxzty/VQ6B1EUZqoCU04zoRU= --sync-url=https://sync-v2.brave.com/v2 --lso-url=https://no-thanks.invalid --variations-server-url=https://variations.brave.com/seed --enable-features=WebUIDarkMode,LegacyTLSEnforced,AutoupgradeMixedContent,SafetyTip,PasswordImport,ReducedReferrerGranularity,PrefetchPrivacyChanges --disable-features=SignedExchangeSubresourcePrefetch,IdleDetection,FledgeInterestGroups,FlocIdComputedEventLogging,HandwritingRecognitionWebPlatformApiFinch,DirectSockets,TrustTokens,InterestCohortFeaturePolicy,WebOTP,NotificationTriggers,InterestCohortAPIOriginTrial,FledgeInterestGroupAPI,AutofillEnableAccountWalletStorage,FirstPartySets,FederatedLearningOfCohorts,PrivacySandboxSettings,SignedExchangePrefetchCacheForNavigations,NetworkTimeServiceQuerying,SubresourceWebBundles,HandwritingRecognitionWebPlatformApi,AutofillServerCommunication,LiveCaption,LangClientHintHeader,EnableProfilePickerOnStartup,TextFragmentAnchor,EnablePasswordsAccountStorage --flag-switches-begin --flag-switches-end
Executable Path /Applications/Brave Browser.app/Contents/MacOS/Brave Browser
Profile Path /Users/MyUsername/Library/Application Support/BraveSoftware/Brave-Browser/Default
Variations AdRewardsStudy:NextPaymentDay
AdServingStudy:MaximumAdNotificationsPerDay=100
AdvertiserSplitTestStudy:GroupA
BraveAds.FrequencyCappingStudy:ExcludeAdIfWithinTimeWindow=0h
BraveAds.UserActivityStudy:Triggers=EMPTY/Threshold=0.0/IdleTimeThreshold=5
EphemeralStorageStudy:Enabled
MacCoreLocationBackendStudy:Enabled
NativeCosmeticFilteringStudy:Enabled
PermissionLifetimeReleaseStudy:Enabled
SpeedreaderReleaseStudy:Disabled

Version/Channel Information:

Seems to have been an issue for a while. I also went back and downloaded a 'Nightly' version 1.3.4 to see if this is a regression and it doesn't work there.

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields? n/a
  • Does the issue resolve itself when disabling Brave Rewards? n/a
  • Is the issue reproducible on the latest version of Chrome? n/a

Miscellaneous Information:

We tested this on Windows using steps in this article https://support.brave.com/hc/en-us/articles/360039248271 and that worked fine.

This also occurs using macOS Big Sur 11.5.

Using the steps to disable Incognito from the same 15202 issue (defaults write com.brave.Browser IncognitoModeAvailability -integer 1) works fine.

@yrliou
Copy link
Member

yrliou commented Aug 20, 2021

We currently only support Tor policy on Windows (https://github.com/brave/brave-core/blob/master/script/policy_source_helper.py#L19), we should consider support all platforms, cc @simonhong

@simonhong simonhong self-assigned this Aug 20, 2021
@rebron rebron added the priority/P4 Planned work. We expect to get to it "soon". label Aug 20, 2021
simonhong added a commit to brave/brave-core that referenced this issue Aug 20, 2021
fix: brave/brave-browser#17530

So far, this policy is not available on macOS.
This change enables this policy on macOS and makes brave://policy
displays this policy status properly on macOS/linux.
@simonhong simonhong added this to the 1.30.x - Nightly milestone Aug 20, 2021
@stephendonner
Copy link

stephendonner commented Aug 20, 2021

Verified PASSED using

Brave 1.30.38 Chromium: 93.0.4577.51 (Official Build) nightly (x86_64)
Revision 762d21050e2da59930c784c09b134d0b0b148188-refs/branch-heads/4577@{#915}
OS macOS Version 11.5.2 (Build 20G95)

Steps:

  1. wrote defaults write com.brave.Browser TorDisabled -integer 1 into a Terminal.app window and pressed enter
  2. new profile
  3. launched Brave
  4. clicked on the "hamburger" menu and confirmed there's no New Private Window with Tor option
  5. clicked on the File menu and confirmed New Private Window with Tor is ghosted out
  6. loaded brave://policy and confirm TorDisabled is set to true

Note: filed #17609 since the Private Window with Tor Settings menu item should be disabled.

example example example
Screen Shot 2021-08-20 at 8 55 01 AM Screen Shot 2021-08-20 at 11 50 11 AM Screen Shot 2021-08-20 at 8 56 27 AM

Verified PASSED using

Brave 1.30.66 Chromium: 93.0.4577.63 (Official Build) dev (64-bit)
Revision ff5c0da2ec0adeaed5550e6c7e98417dac77d98a-refs/branch-heads/4577@{#1135}
OS Linux

Set up the policy:

  1. Create /etc/brave/policies/managed directory
  2. Create file (/etc/brave/policies/managed/00_tor.json) with below content.
    { "TorDisabled": true }
  3. Launch browser and check tor is disabled
  4. Delete /etc/brave/policies/managed directory
  5. Create /etc/chromium/policies/managed directory
  6. Create file (/etc/chromium/policies/managed/00_tor.json) with below content.
    { "TorDisabled": false }
  7. Re-launch browser and check tor is enabled
  8. clicked on the "hamburger" menu and confirmed there's no New Private Window with Tor option
  9. clicked on the File menu and confirmed New Private Window with Tor is ghosted out
  10. loaded brave://policy and confirm TorDisabled is set to true

Note: filed #17609 since the Private Window with Tor Settings menu item should be disabled.

example example example
Screen Shot 2021-09-07 at 1 56 42 PM Screen Shot 2021-09-07 at 1 57 39 PM Screen Shot 2021-09-07 at 1 58 41 PM

@3jdp
Copy link
Author

3jdp commented Aug 25, 2021

Thanks for implementing this so quickly!

FYI For documentation purposes, it looks like the previous command mentioned defaults write com.brave.Browser TorDisabled -integer 1 errors out when I tried with Nightly build 1.30.48/93.0.4577.51, but defaults write com.brave.Browser TorDisabled -bool true does the trick.

@stephendonner stephendonner added QA/In-Progress Indicates that QA is currently in progress for that particular issue QA Pass-Linux labels Sep 7, 2021
@stephendonner stephendonner removed the QA/In-Progress Indicates that QA is currently in progress for that particular issue label Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants