brizental pushed to branch tor-browser-153.2.0esr-16.0-1 at The Tor Project / Applications / Tor Browser
Commits:
-
825cf57f
by Beatriz Rizental at 2026-09-01T11:26:22-03:00
-
7abdb578
by Beatriz Rizental at 2026-09-01T11:26:23-03:00
4 changed files:
- browser/app/profile/000-tor-browser.js
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsDetailsExceptionsFragment.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SiteSettingsFragment.kt
- mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
Changes:
| ... | ... | @@ -23,6 +23,10 @@ pref("network.http.max-persistent-connections-per-proxy", 256); |
| 23 | 23 | // Disable DNS over HTTPS. Set to explicitly off MODE_TRROFF = 5.
|
| 24 | 24 | // See tor-browser#41906.
|
| 25 | 25 | pref("network.trr.mode", 5, locked);
|
| 26 | +// tor-browser#44155: Block Local Network Access (LNA)
|
|
| 27 | +pref("network.lna.enabled", true);
|
|
| 28 | +pref("network.lna.blocking", true);
|
|
| 29 | +pref("network.lna.block_trackers", true);
|
|
| 26 | 30 | |
| 27 | 31 | // Treat .onions as secure
|
| 28 | 32 | pref("dom.securecontext.allowlist_onions", true);
|
| ... | ... | @@ -79,8 +79,6 @@ class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat(), Sys |
| 79 | 79 | |
| 80 | 80 | @VisibleForTesting
|
| 81 | 81 | internal fun bindCategoryPhoneFeatures() {
|
| 82 | - val settings = provideSettings()
|
|
| 83 | - |
|
| 84 | 82 | initPhoneFeature(CAMERA)
|
| 85 | 83 | initPhoneFeature(LOCATION)
|
| 86 | 84 | initPhoneFeature(MICROPHONE)
|
| ... | ... | @@ -89,8 +87,10 @@ class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat(), Sys |
| 89 | 87 | initPhoneFeature(CROSS_ORIGIN_STORAGE_ACCESS)
|
| 90 | 88 | initPhoneFeature(MEDIA_KEY_SYSTEM_ACCESS)
|
| 91 | 89 | initAutoplayFeature()
|
| 92 | - initPhoneFeature(LOCAL_DEVICE_ACCESS, visible = settings.isLnaFeatureEnabled)
|
|
| 93 | - initPhoneFeature(LOCAL_NETWORK_ACCESS, visible = settings.isLnaFeatureEnabled)
|
|
| 90 | + // tor-browser#44155: Don't show local network / device toggles.
|
|
| 91 | + // We want it always in the same state: blocked.
|
|
| 92 | + initPhoneFeature(LOCAL_DEVICE_ACCESS, visible = false)
|
|
| 93 | + initPhoneFeature(LOCAL_NETWORK_ACCESS, visible = false)
|
|
| 94 | 94 | bindClearPermissionsButton()
|
| 95 | 95 | }
|
| 96 | 96 |
| ... | ... | @@ -92,7 +92,9 @@ class SiteSettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragm |
| 92 | 92 | // not need to be bound
|
| 93 | 93 | .filter { it != PhoneFeature.AUTOPLAY_INAUDIBLE }
|
| 94 | 94 | .excludeFeatures(
|
| 95 | - condition = { !requireComponents.settings.isLnaFeatureEnabled },
|
|
| 95 | + // tor-browser#44155: Don't show local network / device toggles.
|
|
| 96 | + // We want it always in the same state: blocked.
|
|
| 97 | + condition = { true },
|
|
| 96 | 98 | features = setOf(
|
| 97 | 99 | PhoneFeature.LOCAL_DEVICE_ACCESS,
|
| 98 | 100 | PhoneFeature.LOCAL_NETWORK_ACCESS,
|
| ... | ... | @@ -1009,18 +1009,12 @@ class Settings( |
| 1009 | 1009 | /**
|
| 1010 | 1010 | * Indicates if the request blocking feature for Local Network / Local Device Access blocking is enabled.
|
| 1011 | 1011 | */
|
| 1012 | - var isLnaBlockingEnabled by booleanPreference(
|
|
| 1013 | - key = appContext.getPreferenceKey(R.string.pref_key_enable_lna_blocking_enabled),
|
|
| 1014 | - default = { FxNimbus.features.lnaBlocking.value().blocking || Config.channel.isNightlyOrDebug },
|
|
| 1015 | - )
|
|
| 1012 | + var isLnaBlockingEnabled: Boolean = true
|
|
| 1016 | 1013 | |
| 1017 | 1014 | /**
|
| 1018 | 1015 | * Indicates if the Local Network / Local Device Access tracker blocking feature is enabled.
|
| 1019 | 1016 | */
|
| 1020 | - var isLnaTrackerBlockingEnabled by booleanPreference(
|
|
| 1021 | - key = appContext.getPreferenceKey(R.string.pref_key_enable_lna_tracker_blocking_enabled),
|
|
| 1022 | - default = { FxNimbus.features.lnaBlocking.value().blockTrackers },
|
|
| 1023 | - )
|
|
| 1017 | + var isLnaTrackerBlockingEnabled: Boolean = true
|
|
| 1024 | 1018 | |
| 1025 | 1019 | /**
|
| 1026 | 1020 | * Indicates if the overall Local Network / Local Device Access feature is enabled.
|
| ... | ... | @@ -1029,10 +1023,7 @@ class Settings( |
| 1029 | 1023 | * allowing requests that originate from remote origins targeting either localhost addresses or
|
| 1030 | 1024 | * local network addresses.
|
| 1031 | 1025 | */
|
| 1032 | - var isLnaFeatureEnabled by booleanPreference(
|
|
| 1033 | - key = appContext.getPreferenceKey(R.string.pref_key_enable_lna_feature_enabled),
|
|
| 1034 | - default = { FxNimbus.features.lnaBlocking.value().enabled || Config.channel.isNightlyOrDebug },
|
|
| 1035 | - )
|
|
| 1026 | + val isLnaFeatureEnabled: Boolean = true
|
|
| 1036 | 1027 | |
| 1037 | 1028 | /**
|
| 1038 | 1029 | * Indicates whether isolated content processes are enabled or not.
|