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 fixup! TB 40562: Added Tor Browser preferences to 000-tor-browser.js Bug 44155: Set local network access prefs to block it all. This is defense-in-depth, since other mechanisms already block it. - - - - - 7abdb578 by Beatriz Rizental at 2026-09-01T11:26:23-03:00 fixup! [android] Disable features and functionality Bug 44155: Hide local network access toggles from settings. These toggles are no-op already, since local network access is always disabled throuh other mechanisms. - - - - - 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: ===================================== browser/app/profile/000-tor-browser.js ===================================== @@ -23,6 +23,10 @@ pref("network.http.max-persistent-connections-per-proxy", 256); // Disable DNS over HTTPS. Set to explicitly off MODE_TRROFF = 5. // See tor-browser#41906. pref("network.trr.mode", 5, locked); +// tor-browser#44155: Block Local Network Access (LNA) +pref("network.lna.enabled", true); +pref("network.lna.blocking", true); +pref("network.lna.block_trackers", true); // Treat .onions as secure pref("dom.securecontext.allowlist_onions", true); ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsDetailsExceptionsFragment.kt ===================================== @@ -79,8 +79,6 @@ class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat(), Sys @VisibleForTesting internal fun bindCategoryPhoneFeatures() { - val settings = provideSettings() - initPhoneFeature(CAMERA) initPhoneFeature(LOCATION) initPhoneFeature(MICROPHONE) @@ -89,8 +87,10 @@ class SitePermissionsDetailsExceptionsFragment : PreferenceFragmentCompat(), Sys initPhoneFeature(CROSS_ORIGIN_STORAGE_ACCESS) initPhoneFeature(MEDIA_KEY_SYSTEM_ACCESS) initAutoplayFeature() - initPhoneFeature(LOCAL_DEVICE_ACCESS, visible = settings.isLnaFeatureEnabled) - initPhoneFeature(LOCAL_NETWORK_ACCESS, visible = settings.isLnaFeatureEnabled) + // tor-browser#44155: Don't show local network / device toggles. + // We want it always in the same state: blocked. + initPhoneFeature(LOCAL_DEVICE_ACCESS, visible = false) + initPhoneFeature(LOCAL_NETWORK_ACCESS, visible = false) bindClearPermissionsButton() } ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SiteSettingsFragment.kt ===================================== @@ -92,7 +92,9 @@ class SiteSettingsFragment : PreferenceFragmentCompat(), SystemInsetsPaddedFragm // not need to be bound .filter { it != PhoneFeature.AUTOPLAY_INAUDIBLE } .excludeFeatures( - condition = { !requireComponents.settings.isLnaFeatureEnabled }, + // tor-browser#44155: Don't show local network / device toggles. + // We want it always in the same state: blocked. + condition = { true }, features = setOf( PhoneFeature.LOCAL_DEVICE_ACCESS, PhoneFeature.LOCAL_NETWORK_ACCESS, ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt ===================================== @@ -1009,18 +1009,12 @@ class Settings( /** * Indicates if the request blocking feature for Local Network / Local Device Access blocking is enabled. */ - var isLnaBlockingEnabled by booleanPreference( - key = appContext.getPreferenceKey(R.string.pref_key_enable_lna_blocking_enabled), - default = { FxNimbus.features.lnaBlocking.value().blocking || Config.channel.isNightlyOrDebug }, - ) + var isLnaBlockingEnabled: Boolean = true /** * Indicates if the Local Network / Local Device Access tracker blocking feature is enabled. */ - var isLnaTrackerBlockingEnabled by booleanPreference( - key = appContext.getPreferenceKey(R.string.pref_key_enable_lna_tracker_blocking_enabled), - default = { FxNimbus.features.lnaBlocking.value().blockTrackers }, - ) + var isLnaTrackerBlockingEnabled: Boolean = true /** * Indicates if the overall Local Network / Local Device Access feature is enabled. @@ -1029,10 +1023,7 @@ class Settings( * allowing requests that originate from remote origins targeting either localhost addresses or * local network addresses. */ - var isLnaFeatureEnabled by booleanPreference( - key = appContext.getPreferenceKey(R.string.pref_key_enable_lna_feature_enabled), - default = { FxNimbus.features.lnaBlocking.value().enabled || Config.channel.isNightlyOrDebug }, - ) + val isLnaFeatureEnabled: Boolean = true /** * Indicates whether isolated content processes are enabled or not. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/12016c7... -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/12016c7... You're receiving this email because of your account on gitlab.torproject.org. Manage all notifications: https://gitlab.torproject.org/-/profile/notifications | Help: https://gitlab.torproject.org/help