[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][tor-browser-153.2.0esr-16.0-1] 2 commits: fixup! TB 40562: Added Tor Browser preferences to 000-tor-browser.js



Title: GitLab

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:

Changes:

  • browser/app/profile/000-tor-browser.js
    ... ... @@ -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);
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SitePermissionsDetailsExceptionsFragment.kt
    ... ... @@ -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
     
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/sitepermissions/SiteSettingsFragment.kt
    ... ... @@ -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,
    

  • mobile/android/fenix/app/src/main/java/org/mozilla/fenix/utils/Settings.kt
    ... ... @@ -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.
    

  • _______________________________________________
    tor-commits mailing list -- tor-commits@xxxxxxxxxxxxxxxxxxxx
    To unsubscribe send an email to tor-commits-leave@xxxxxxxxxxxxxxxxxxxx