lists.torproject.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

tbb-commits

Thread Start a new thread
Download
Threads by month
  • ----- 2025 -----
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2021 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2020 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2019 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2018 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2017 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2016 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2015 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2014 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
tbb-commits@lists.torproject.org

  • 1 participants
  • 18597 discussions
[Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] 2 commits: fixup! [android] Rename as Tor Browser
by morgan (@morgan) 21 Oct '24

21 Oct '24
morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: cac6c9f2 by cypherpunks1 at 2024-10-21T19:15:36+00:00 fixup! [android] Rename as Tor Browser Bug 43228: Fix the What&#39;s new text - - - - - c7d2cb7f by cypherpunks1 at 2024-10-21T19:15:36+00:00 fixup! Bug 42195: [android] Fix &quot;Whats new URL&quot; Bug 43228: Fix the What&#39;s new URL - - - - - 2 changed files: - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt - mobile/android/fenix/app/src/main/res/values/static_strings.xml Changes: ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt ===================================== @@ -110,14 +110,10 @@ object SupportUtils { } fun getTorWhatsNewUrl(): String { - val fullVersionName: String = BuildConfig.VERSION_NAME // e.g. "115.2.1-beta (13.5a5)" - if (!fullVersionName.contains('(') || !fullVersionName.contains(')')) { + val versionNumber = BuildConfig.VERSION_NAME.substringBefore(' ') // e.g. "13.5a5" + if (versionNumber.isEmpty()) { return "https://blog.torproject.org/" } - val versionNumber: String = fullVersionName.substring( - fullVersionName.indexOf('(') + 1, - fullVersionName.indexOf(')'), - ) // e.g. "13.5a5" val alpha: String = if (versionNumber.contains('a')) "alpha-" else "" val versionNumberNoDecimals: String = versionNumber.split('.').joinToString("") // e.g. "135a5" ===================================== mobile/android/fenix/app/src/main/res/values/static_strings.xml ===================================== @@ -5,7 +5,7 @@ <resources> <!-- Name of the application --> <string name="app_name" translatable="false">Tor Browser Dev</string> - <string name="firefox" translatable="false">Firefox</string> + <string name="firefox" translatable="false">Tor Browser</string> <!-- Preference for developers --> <string name="preference_leakcanary" translatable="false">LeakCanary</string> View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/903795… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/903795… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] fixup! [android] Modify UI/UX
by morgan (@morgan) 21 Oct '24

21 Oct '24
morgan pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: 90379594 by cypherpunks1 at 2024-10-21T18:49:52+00:00 fixup! [android] Modify UI/UX Bug 43223: Hide option to open bookmarks in non-private tabs on Android - - - - - 2 changed files: - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt - mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkItemMenu.kt Changes: ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkFragment.kt ===================================== @@ -55,6 +55,7 @@ import org.mozilla.fenix.ext.getRootView import org.mozilla.fenix.ext.nav import org.mozilla.fenix.ext.requireComponents import org.mozilla.fenix.ext.setTextColor +import org.mozilla.fenix.ext.settings import org.mozilla.fenix.library.LibraryPageFragment import org.mozilla.fenix.tabstray.Page import org.mozilla.fenix.utils.allowUndo @@ -179,6 +180,10 @@ class BookmarkFragment : LibraryPageFragment<BookmarkNode>(), UserInteractionHan } else { inflater.inflate(R.menu.bookmarks_select_multi, menu) + menu.findItem(R.id.open_bookmarks_in_new_tabs_multi_select)?.apply { + isVisible = !requireContext().settings().shouldDisableNormalMode + } + menu.findItem(R.id.delete_bookmarks_multi_select).title = SpannableString(getString(R.string.bookmark_menu_delete_button)).apply { setTextColor(requireContext(), R.attr.textCritical) ===================================== mobile/android/fenix/app/src/main/java/org/mozilla/fenix/library/bookmarks/BookmarkItemMenu.kt ===================================== @@ -14,6 +14,7 @@ import mozilla.components.concept.storage.BookmarkNodeType import mozilla.components.support.ktx.android.content.getColorFromAttr import org.mozilla.fenix.R import org.mozilla.fenix.ext.bookmarkStorage +import org.mozilla.fenix.ext.settings class BookmarkItemMenu( private val context: Context, @@ -37,6 +38,7 @@ class BookmarkItemMenu( @SuppressWarnings("LongMethod") internal suspend fun menuItems(itemType: BookmarkNodeType, itemId: String): List<TextMenuCandidate> { val hasAtLeastOneChild = !context.bookmarkStorage.getTree(itemId, false)?.children.isNullOrEmpty() + val shouldDisableNormalMode = context.settings().shouldDisableNormalMode return listOfNotNull( if (itemType != BookmarkNodeType.SEPARATOR) { @@ -66,7 +68,7 @@ class BookmarkItemMenu( } else { null }, - if (itemType == BookmarkNodeType.ITEM) { + if (!shouldDisableNormalMode && itemType == BookmarkNodeType.ITEM) { TextMenuCandidate( text = context.getString(R.string.bookmark_menu_open_in_new_tab_button), ) { @@ -84,7 +86,7 @@ class BookmarkItemMenu( } else { null }, - if (hasAtLeastOneChild && itemType == BookmarkNodeType.FOLDER) { + if (!shouldDisableNormalMode && hasAtLeastOneChild && itemType == BookmarkNodeType.FOLDER) { TextMenuCandidate( text = context.getString(R.string.bookmark_menu_open_all_in_tabs_button), ) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9037959… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/9037959… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] fixup! Bug 30237: Add v3 onion services client authentication prompt
by Pier Angelo Vendrame (@pierov) 21 Oct '24

21 Oct '24
Pier Angelo Vendrame pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: 1370d5e6 by Henry Wilkes at 2024-10-21T16:52:05+01:00 fixup! Bug 30237: Add v3 onion services client authentication prompt Bug 43218: Switch to browser.reload, since &quot;Browser:Reload&quot; signal was dropped upstream. - - - - - 1 changed file: - browser/components/onionservices/content/authPrompt.js Changes: ===================================== browser/components/onionservices/content/authPrompt.js ===================================== @@ -227,7 +227,7 @@ var OnionAuthPrompt = { notification.remove(); // Success! Reload the page. - browser.sendMessageToActor("Browser:Reload", {}, "BrowserTab"); + browser.reload(); }, /** View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1370d5e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/1370d5e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-build][maint-14.0] Bug 41270: Add updater rewriterules to make 13.5.7 a watershed
by boklm (@boklm) 21 Oct '24

21 Oct '24
boklm pushed to branch maint-14.0 at The Tor Project / Applications / tor-browser-build Commits: deed1220 by Nicolas Vigier at 2024-10-21T17:51:12+02:00 Bug 41270: Add updater rewriterules to make 13.5.7 a watershed Co-authored-by: Pier Angelo Vendrame &lt;pierov(a)torproject.org&gt; - - - - - 1 changed file: - projects/release/update_responses_config.yml Changes: ===================================== projects/release/update_responses_config.yml ===================================== @@ -119,4 +119,9 @@ htaccess_rewrite_rules: RewriteRule ^[^/]+/11\.0.*/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last] RewriteRule ^[^/]+/11\.5/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last] RewriteRule ^[^/]+/11\.5\.[01234567]/.* https://aus1.torproject.org/torbrowser/update_pre12.0/release/$0 [last] + # tor-browser-build#41270: make 13.5.7 a watershed update + RewriteRule ^[^/]+/1[12]\.[05].*/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last] + RewriteRule ^[^/]+/13\.0.*/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last] + RewriteRule ^[^/]+/13\.5/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last] + RewriteRule ^[^/]+/13\.5\.[0123456]/.* https://aus1.torproject.org/torbrowser/update_pre14.0/release/$0 [last] [% END -%] View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/d… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] Bug 43006: Disable RFP for Font Visibility on Android
by Pier Angelo Vendrame (@pierov) 21 Oct '24

21 Oct '24
Pier Angelo Vendrame pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: 43b3ff4d by Dan Ballard at 2024-10-21T15:20:38+00:00 Bug 43006: Disable RFP for Font Visibility on Android - - - - - 1 changed file: - dom/base/Document.cpp Changes: ===================================== dom/base/Document.cpp ===================================== @@ -16403,6 +16403,12 @@ bool Document::RecomputeResistFingerprinting() { } bool Document::ShouldResistFingerprinting(RFPTarget aTarget) const { +#ifdef ANDROID + if (aTarget == RFPTarget::FontVisibilityBaseSystem || + aTarget == RFPTarget::FontVisibilityLangPack) { + return false; + } +#endif return mShouldResistFingerprinting && nsRFPService::IsRFPEnabledFor(this->IsInPrivateBrowsing(), aTarget, mOverriddenFingerprintingSettings); View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/43b3ff4… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/43b3ff4… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser-update-responses][main] Copy update_3/release to update_pre14.0/release for tor-browser-build#41270
by boklm (@boklm) 21 Oct '24

21 Oct '24
boklm pushed to branch main at The Tor Project / Applications / Tor Browser update responses Commits: 87e03758 by Nicolas Vigier at 2024-10-21T17:21:10+02:00 Copy update_3/release to update_pre14.0/release for tor-browser-build#41270 - - - - - 30 changed files: - + update_pre14.0/release/.htaccess - + update_pre14.0/release/13.5.4-13.5.7-linux-i686-ALL.xml - + update_pre14.0/release/13.5.4-13.5.7-linux-x86_64-ALL.xml - + update_pre14.0/release/13.5.4-13.5.7-macos-ALL.xml - + update_pre14.0/release/13.5.4-13.5.7-windows-i686-ALL.xml - + update_pre14.0/release/13.5.4-13.5.7-windows-x86_64-ALL.xml - + update_pre14.0/release/13.5.5-13.5.7-linux-i686-ALL.xml - + update_pre14.0/release/13.5.5-13.5.7-linux-x86_64-ALL.xml - + update_pre14.0/release/13.5.5-13.5.7-macos-ALL.xml - + update_pre14.0/release/13.5.5-13.5.7-windows-i686-ALL.xml - + update_pre14.0/release/13.5.5-13.5.7-windows-x86_64-ALL.xml - + update_pre14.0/release/13.5.6-13.5.7-linux-i686-ALL.xml - + update_pre14.0/release/13.5.6-13.5.7-linux-x86_64-ALL.xml - + update_pre14.0/release/13.5.6-13.5.7-macos-ALL.xml - + update_pre14.0/release/13.5.6-13.5.7-windows-i686-ALL.xml - + update_pre14.0/release/13.5.6-13.5.7-windows-x86_64-ALL.xml - + update_pre14.0/release/13.5.7-linux-i686-ALL.xml - + update_pre14.0/release/13.5.7-linux-x86_64-ALL.xml - + update_pre14.0/release/13.5.7-macos-ALL.xml - + update_pre14.0/release/13.5.7-windows-i686-ALL.xml - + update_pre14.0/release/13.5.7-windows-x86_64-ALL.xml - + update_pre14.0/release/download-android-aarch64.json - + update_pre14.0/release/download-android-armv7.json - + update_pre14.0/release/download-android-x86.json - + update_pre14.0/release/download-android-x86_64.json - + update_pre14.0/release/download-linux-i686.json - + update_pre14.0/release/download-linux-x86_64.json - + update_pre14.0/release/download-macos.json - + update_pre14.0/release/download-windows-i686.json - + update_pre14.0/release/download-windows-x86_64.json The diff was not included because it is too large. View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-update-responses… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-update-responses… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-115.16.0esr-13.5-1] fixup! Bug 40597: Implement TorSettings module
by ma1 (@ma1) 21 Oct '24

21 Oct '24
ma1 pushed to branch tor-browser-115.16.0esr-13.5-1 at The Tor Project / Applications / Tor Browser Commits: 8dbe6b39 by hackademix at 2024-10-21T11:02:24+02:00 fixup! Bug 40597: Implement TorSettings module - - - - - 1 changed file: - toolkit/modules/TorConnect.sys.mjs Changes: ===================================== toolkit/modules/TorConnect.sys.mjs ===================================== @@ -1301,7 +1301,15 @@ export const TorConnect = { // which redirect after bootstrapping getURIsToLoad(uriVariant) { const uris = this.fixupURIs(uriVariant); - lazy.logger.debug(`Will load after bootstrap => [${uris.join(", ")}]`); - return uris.map(uri => this.getRedirectURL(uri)); + const localUriRx = /^(file:\/\/\/|moz-extension:)/; + lazy.logger.debug( + `Will load after bootstrap => [${uris + .filter(uri => !localUriRx.test(uri)) + .join(", ")}]` + ); + + return uris.map(uri => + localUriRx.test(uri) ? uri : this.getRedirectURL(uri) + ); }, }; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/8dbe6b3… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/8dbe6b3… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][tor-browser-128.3.0esr-14.0-1] fixup! Bug 40597: Implement TorSettings module
by ma1 (@ma1) 21 Oct '24

21 Oct '24
ma1 pushed to branch tor-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: fc0af914 by hackademix at 2024-10-18T10:54:46+02:00 fixup! Bug 40597: Implement TorSettings module - - - - - 1 changed file: - toolkit/modules/TorConnect.sys.mjs Changes: ===================================== toolkit/modules/TorConnect.sys.mjs ===================================== @@ -1302,7 +1302,15 @@ export const TorConnect = { // which redirect after bootstrapping getURIsToLoad(uriVariant) { const uris = this.fixupURIs(uriVariant); - lazy.logger.debug(`Will load after bootstrap => [${uris.join(", ")}]`); - return uris.map(uri => this.getRedirectURL(uri)); + const localUriRx = /^(file:\/\/\/|moz-extension:)/; + lazy.logger.debug( + `Will load after bootstrap => [${uris + .filter(uri => !localUriRx.test(uri)) + .join(", ")}]` + ); + + return uris.map(uri => + localUriRx.test(uri) ? uri : this.getRedirectURL(uri) + ); }, }; View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/fc0af91… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/fc0af91… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/mullvad-browser][mullvad-browser-128.3.0esr-14.0-1] Bug 1436226: Ignore user prefs and hardware support for media capabilities...
by morgan (@morgan) 17 Oct '24

17 Oct '24
morgan pushed to branch mullvad-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Mullvad Browser Commits: e8ef660b by Fatih at 2024-10-17T20:54:59+00:00 Bug 1436226: Ignore user prefs and hardware support for media capabilities when RFPTarget::MediaCapabilities is enabled. r=tjr,media-playback-reviewers,padenot This patch mostly targeted Android, as media.mediasource.vp9.enabled is disabled on only Android and HW support takes precedence over pref, hence leaking HW support for VP9. However, we ended up modifying the patch to ignore prefs or HW support, fixing both possible user pref leak and HW support leak. Differential Revision: https://phabricator.services.mozilla.com/D221338 - - - - - 5 changed files: - dom/media/eme/MediaKeySystemAccess.cpp - dom/media/mediacapabilities/MediaCapabilities.cpp - dom/media/mediasource/MediaSource.cpp - dom/media/mediasource/MediaSource.h - dom/media/mediasource/SourceBuffer.cpp Changes: ===================================== dom/media/eme/MediaKeySystemAccess.cpp ===================================== @@ -319,8 +319,8 @@ static bool CanDecryptAndDecode( CodecType aCodecType, const KeySystemConfig::ContainerSupport& aContainerSupport, const nsTArray<KeySystemConfig::EMECodecString>& aCodecs, - const Maybe<CryptoScheme>& aScheme, - DecoderDoctorDiagnostics* aDiagnostics) { + const Maybe<CryptoScheme>& aScheme, DecoderDoctorDiagnostics* aDiagnostics, + Maybe<bool> aShouldResistFingerprinting) { MOZ_ASSERT(aCodecType != Invalid); for (const KeySystemConfig::EMECodecString& codec : aCodecs) { MOZ_ASSERT(!codec.IsEmpty()); @@ -332,7 +332,8 @@ static bool CanDecryptAndDecode( if (aContainerSupport.Decrypts(codec, aScheme)) { IgnoredErrorResult rv; - MediaSource::IsTypeSupported(aContentType, aDiagnostics, rv); + MediaSource::IsTypeSupported(aContentType, aDiagnostics, rv, + aShouldResistFingerprinting); if (!rv.Failed()) { // GMP can decrypt and is allowed to return compressed samples to // Gecko to decode, and Gecko has a decoder. @@ -709,9 +710,13 @@ static Sequence<MediaKeySystemMediaCapability> GetSupportedCapabilities( // restrictions... const auto& containerSupport = supportedInMP4 ? aKeySystem.mMP4 : aKeySystem.mWebM; + Maybe<bool> shouldResistFingerprinting = + aDocument ? Some(aDocument->ShouldResistFingerprinting( + RFPTarget::MediaCapabilities)) + : Nothing(); if (!CanDecryptAndDecode(aKeySystem.mKeySystem, contentTypeString, majorType, containerSupport, codecs, scheme, - aDiagnostics)) { + aDiagnostics, shouldResistFingerprinting)) { EME_LOG( "MediaKeySystemConfiguration (label='%s') " "MediaKeySystemMediaCapability('%s','%s','%s') unsupported; " ===================================== dom/media/mediacapabilities/MediaCapabilities.cpp ===================================== @@ -577,8 +577,9 @@ Maybe<MediaContainerType> MediaCapabilities::CheckAudioConfiguration( bool MediaCapabilities::CheckTypeForMediaSource(const nsAString& aType) { IgnoredErrorResult rv; - MediaSource::IsTypeSupported(aType, nullptr /* DecoderDoctorDiagnostics */, - rv); + MediaSource::IsTypeSupported( + aType, nullptr /* DecoderDoctorDiagnostics */, rv, + Some(mParent->ShouldResistFingerprinting(RFPTarget::MediaCapabilities))); return !rv.Failed(); } ===================================== dom/media/mediasource/MediaSource.cpp ===================================== @@ -23,6 +23,7 @@ #include "mozilla/Sprintf.h" #include "mozilla/StaticPrefs_media.h" #include "mozilla/dom/BindingDeclarations.h" +#include "mozilla/dom/Document.h" #include "mozilla/dom/HTMLMediaElement.h" #include "mozilla/gfx/gfxVars.h" #include "mozilla/mozalloc.h" @@ -133,7 +134,8 @@ static void RecordTypeForTelemetry(const nsAString& aType, /* static */ void MediaSource::IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* aDiagnostics, - ErrorResult& aRv) { + ErrorResult& aRv, + Maybe<bool> aShouldResistFingerprinting) { if (aType.IsEmpty()) { return aRv.ThrowTypeError("Empty type"); } @@ -159,16 +161,25 @@ void MediaSource::IsTypeSupported(const nsAString& aType, // Now we know that this media type could be played. // MediaSource imposes extra restrictions, and some prefs. + // Avoid leaking information about the fact that it's pref-disabled, + // or that HW acceleration is available (only applicable to VP9 on Android). + bool shouldResistFingerprinting = + aShouldResistFingerprinting.isSome() + ? aShouldResistFingerprinting.value() + : nsContentUtils::ShouldResistFingerprinting( + "Couldn't drill down ShouldResistFingerprinting", + RFPTarget::MediaCapabilities); const MediaMIMEType& mimeType = containerType->Type(); if (mimeType == MEDIAMIMETYPE("video/mp4") || mimeType == MEDIAMIMETYPE("audio/mp4")) { - if (!StaticPrefs::media_mediasource_mp4_enabled()) { + if (!StaticPrefs::media_mediasource_mp4_enabled() && + !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); } if (!StaticPrefs::media_mediasource_vp9_enabled() && hasVP9 && - !IsVP9Forced(aDiagnostics)) { + !IsVP9Forced(aDiagnostics) && !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); @@ -177,13 +188,14 @@ void MediaSource::IsTypeSupported(const nsAString& aType, return; } if (mimeType == MEDIAMIMETYPE("video/webm")) { - if (!StaticPrefs::media_mediasource_webm_enabled()) { + if (!StaticPrefs::media_mediasource_webm_enabled() && + !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); } if (!StaticPrefs::media_mediasource_vp9_enabled() && hasVP9 && - !IsVP9Forced(aDiagnostics)) { + !IsVP9Forced(aDiagnostics) && !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); @@ -191,7 +203,8 @@ void MediaSource::IsTypeSupported(const nsAString& aType, return; } if (mimeType == MEDIAMIMETYPE("audio/webm")) { - if (!StaticPrefs::media_mediasource_webm_enabled()) { + if (!StaticPrefs::media_mediasource_webm_enabled() && + !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); @@ -280,13 +293,16 @@ void MediaSource::SetDuration(const media::TimeUnit& aDuration) { already_AddRefed<SourceBuffer> MediaSource::AddSourceBuffer( const nsAString& aType, ErrorResult& aRv) { MOZ_ASSERT(NS_IsMainThread()); + nsCOMPtr<nsPIDOMWindowInner> window = GetOwner(); + Document* doc = window ? window->GetExtantDoc() : nullptr; DecoderDoctorDiagnostics diagnostics; - IsTypeSupported(aType, &diagnostics, aRv); - RecordTypeForTelemetry(aType, GetOwner()); + IsTypeSupported( + aType, &diagnostics, aRv, + doc ? Some(doc->ShouldResistFingerprinting(RFPTarget::MediaCapabilities)) + : Nothing()); + RecordTypeForTelemetry(aType, window); bool supported = !aRv.Failed(); - diagnostics.StoreFormatDiagnostics( - GetOwner() ? GetOwner()->GetExtantDoc() : nullptr, aType, supported, - __func__); + diagnostics.StoreFormatDiagnostics(doc, aType, supported, __func__); MSE_API("AddSourceBuffer(aType=%s)%s", NS_ConvertUTF16toUTF8(aType).get(), supported ? "" : " [not supported]"); if (!supported) { @@ -433,13 +449,16 @@ bool MediaSource::IsTypeSupported(const GlobalObject& aOwner, MOZ_ASSERT(NS_IsMainThread()); DecoderDoctorDiagnostics diagnostics; IgnoredErrorResult rv; - IsTypeSupported(aType, &diagnostics, rv); - bool supported = !rv.Failed(); nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aOwner.GetAsSupports()); + Document* doc = window ? window->GetExtantDoc() : nullptr; + IsTypeSupported( + aType, &diagnostics, rv, + doc ? Some(doc->ShouldResistFingerprinting(RFPTarget::MediaCapabilities)) + : Nothing()); + bool supported = !rv.Failed(); RecordTypeForTelemetry(aType, window); - diagnostics.StoreFormatDiagnostics(window ? window->GetExtantDoc() : nullptr, - aType, supported, __func__); + diagnostics.StoreFormatDiagnostics(doc, aType, supported, __func__); MOZ_LOG(GetMediaSourceAPILog(), mozilla::LogLevel::Debug, ("MediaSource::%s: IsTypeSupported(aType=%s) %s", __func__, NS_ConvertUTF16toUTF8(aType).get(), ===================================== dom/media/mediasource/MediaSource.h ===================================== @@ -83,7 +83,8 @@ class MediaSource final : public DOMEventTargetHelper, // Throws on aRv if not supported. static void IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* aDiagnostics, - ErrorResult& aRv); + ErrorResult& aRv, + Maybe<bool> aShouldResistFingerprinting); IMPL_EVENT_HANDLER(sourceopen); IMPL_EVENT_HANDLER(sourceended); ===================================== dom/media/mediasource/SourceBuffer.cpp ===================================== @@ -13,6 +13,7 @@ #include "mozilla/ErrorResult.h" #include "mozilla/FloatingPoint.h" #include "mozilla/Preferences.h" +#include "mozilla/dom/Document.h" #include "mozilla/dom/MediaSourceBinding.h" #include "mozilla/dom/TimeRanges.h" #include "mozilla/dom/TypedArray.h" @@ -385,13 +386,16 @@ void SourceBuffer::ChangeType(const nsAString& aType, ErrorResult& aRv) { // previously) of SourceBuffer objects in the sourceBuffers attribute of // the parent media source , then throw a NotSupportedError exception and // abort these steps. + Document* doc = mMediaSource->GetOwner() + ? mMediaSource->GetOwner()->GetExtantDoc() + : nullptr; DecoderDoctorDiagnostics diagnostics; - MediaSource::IsTypeSupported(aType, &diagnostics, aRv); + MediaSource::IsTypeSupported( + aType, &diagnostics, aRv, + doc ? Some(doc->ShouldResistFingerprinting(RFPTarget::MediaCapabilities)) + : Nothing()); bool supported = !aRv.Failed(); - diagnostics.StoreFormatDiagnostics( - mMediaSource->GetOwner() ? mMediaSource->GetOwner()->GetExtantDoc() - : nullptr, - aType, supported, __func__); + diagnostics.StoreFormatDiagnostics(doc, aType, supported, __func__); MSE_API("ChangeType(aType=%s)%s", NS_ConvertUTF16toUTF8(aType).get(), supported ? "" : " [not supported]"); if (!supported) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/e8e… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/commit/e8e… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
[Git][tpo/applications/tor-browser][base-browser-128.3.0esr-14.0-1] Bug 1436226: Ignore user prefs and hardware support for media capabilities...
by morgan (@morgan) 17 Oct '24

17 Oct '24
morgan pushed to branch base-browser-128.3.0esr-14.0-1 at The Tor Project / Applications / Tor Browser Commits: 8f7307ac by Fatih at 2024-10-17T20:54:18+00:00 Bug 1436226: Ignore user prefs and hardware support for media capabilities when RFPTarget::MediaCapabilities is enabled. r=tjr,media-playback-reviewers,padenot This patch mostly targeted Android, as media.mediasource.vp9.enabled is disabled on only Android and HW support takes precedence over pref, hence leaking HW support for VP9. However, we ended up modifying the patch to ignore prefs or HW support, fixing both possible user pref leak and HW support leak. Differential Revision: https://phabricator.services.mozilla.com/D221338 - - - - - 5 changed files: - dom/media/eme/MediaKeySystemAccess.cpp - dom/media/mediacapabilities/MediaCapabilities.cpp - dom/media/mediasource/MediaSource.cpp - dom/media/mediasource/MediaSource.h - dom/media/mediasource/SourceBuffer.cpp Changes: ===================================== dom/media/eme/MediaKeySystemAccess.cpp ===================================== @@ -319,8 +319,8 @@ static bool CanDecryptAndDecode( CodecType aCodecType, const KeySystemConfig::ContainerSupport& aContainerSupport, const nsTArray<KeySystemConfig::EMECodecString>& aCodecs, - const Maybe<CryptoScheme>& aScheme, - DecoderDoctorDiagnostics* aDiagnostics) { + const Maybe<CryptoScheme>& aScheme, DecoderDoctorDiagnostics* aDiagnostics, + Maybe<bool> aShouldResistFingerprinting) { MOZ_ASSERT(aCodecType != Invalid); for (const KeySystemConfig::EMECodecString& codec : aCodecs) { MOZ_ASSERT(!codec.IsEmpty()); @@ -332,7 +332,8 @@ static bool CanDecryptAndDecode( if (aContainerSupport.Decrypts(codec, aScheme)) { IgnoredErrorResult rv; - MediaSource::IsTypeSupported(aContentType, aDiagnostics, rv); + MediaSource::IsTypeSupported(aContentType, aDiagnostics, rv, + aShouldResistFingerprinting); if (!rv.Failed()) { // GMP can decrypt and is allowed to return compressed samples to // Gecko to decode, and Gecko has a decoder. @@ -709,9 +710,13 @@ static Sequence<MediaKeySystemMediaCapability> GetSupportedCapabilities( // restrictions... const auto& containerSupport = supportedInMP4 ? aKeySystem.mMP4 : aKeySystem.mWebM; + Maybe<bool> shouldResistFingerprinting = + aDocument ? Some(aDocument->ShouldResistFingerprinting( + RFPTarget::MediaCapabilities)) + : Nothing(); if (!CanDecryptAndDecode(aKeySystem.mKeySystem, contentTypeString, majorType, containerSupport, codecs, scheme, - aDiagnostics)) { + aDiagnostics, shouldResistFingerprinting)) { EME_LOG( "MediaKeySystemConfiguration (label='%s') " "MediaKeySystemMediaCapability('%s','%s','%s') unsupported; " ===================================== dom/media/mediacapabilities/MediaCapabilities.cpp ===================================== @@ -577,8 +577,9 @@ Maybe<MediaContainerType> MediaCapabilities::CheckAudioConfiguration( bool MediaCapabilities::CheckTypeForMediaSource(const nsAString& aType) { IgnoredErrorResult rv; - MediaSource::IsTypeSupported(aType, nullptr /* DecoderDoctorDiagnostics */, - rv); + MediaSource::IsTypeSupported( + aType, nullptr /* DecoderDoctorDiagnostics */, rv, + Some(mParent->ShouldResistFingerprinting(RFPTarget::MediaCapabilities))); return !rv.Failed(); } ===================================== dom/media/mediasource/MediaSource.cpp ===================================== @@ -23,6 +23,7 @@ #include "mozilla/Sprintf.h" #include "mozilla/StaticPrefs_media.h" #include "mozilla/dom/BindingDeclarations.h" +#include "mozilla/dom/Document.h" #include "mozilla/dom/HTMLMediaElement.h" #include "mozilla/gfx/gfxVars.h" #include "mozilla/mozalloc.h" @@ -133,7 +134,8 @@ static void RecordTypeForTelemetry(const nsAString& aType, /* static */ void MediaSource::IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* aDiagnostics, - ErrorResult& aRv) { + ErrorResult& aRv, + Maybe<bool> aShouldResistFingerprinting) { if (aType.IsEmpty()) { return aRv.ThrowTypeError("Empty type"); } @@ -159,16 +161,25 @@ void MediaSource::IsTypeSupported(const nsAString& aType, // Now we know that this media type could be played. // MediaSource imposes extra restrictions, and some prefs. + // Avoid leaking information about the fact that it's pref-disabled, + // or that HW acceleration is available (only applicable to VP9 on Android). + bool shouldResistFingerprinting = + aShouldResistFingerprinting.isSome() + ? aShouldResistFingerprinting.value() + : nsContentUtils::ShouldResistFingerprinting( + "Couldn't drill down ShouldResistFingerprinting", + RFPTarget::MediaCapabilities); const MediaMIMEType& mimeType = containerType->Type(); if (mimeType == MEDIAMIMETYPE("video/mp4") || mimeType == MEDIAMIMETYPE("audio/mp4")) { - if (!StaticPrefs::media_mediasource_mp4_enabled()) { + if (!StaticPrefs::media_mediasource_mp4_enabled() && + !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); } if (!StaticPrefs::media_mediasource_vp9_enabled() && hasVP9 && - !IsVP9Forced(aDiagnostics)) { + !IsVP9Forced(aDiagnostics) && !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); @@ -177,13 +188,14 @@ void MediaSource::IsTypeSupported(const nsAString& aType, return; } if (mimeType == MEDIAMIMETYPE("video/webm")) { - if (!StaticPrefs::media_mediasource_webm_enabled()) { + if (!StaticPrefs::media_mediasource_webm_enabled() && + !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); } if (!StaticPrefs::media_mediasource_vp9_enabled() && hasVP9 && - !IsVP9Forced(aDiagnostics)) { + !IsVP9Forced(aDiagnostics) && !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); @@ -191,7 +203,8 @@ void MediaSource::IsTypeSupported(const nsAString& aType, return; } if (mimeType == MEDIAMIMETYPE("audio/webm")) { - if (!StaticPrefs::media_mediasource_webm_enabled()) { + if (!StaticPrefs::media_mediasource_webm_enabled() && + !shouldResistFingerprinting) { // Don't leak information about the fact that it's pref-disabled; just act // like we can't play it. Or should this throw "Unknown type"? return aRv.ThrowNotSupportedError("Can't play type"); @@ -280,13 +293,16 @@ void MediaSource::SetDuration(const media::TimeUnit& aDuration) { already_AddRefed<SourceBuffer> MediaSource::AddSourceBuffer( const nsAString& aType, ErrorResult& aRv) { MOZ_ASSERT(NS_IsMainThread()); + nsCOMPtr<nsPIDOMWindowInner> window = GetOwner(); + Document* doc = window ? window->GetExtantDoc() : nullptr; DecoderDoctorDiagnostics diagnostics; - IsTypeSupported(aType, &diagnostics, aRv); - RecordTypeForTelemetry(aType, GetOwner()); + IsTypeSupported( + aType, &diagnostics, aRv, + doc ? Some(doc->ShouldResistFingerprinting(RFPTarget::MediaCapabilities)) + : Nothing()); + RecordTypeForTelemetry(aType, window); bool supported = !aRv.Failed(); - diagnostics.StoreFormatDiagnostics( - GetOwner() ? GetOwner()->GetExtantDoc() : nullptr, aType, supported, - __func__); + diagnostics.StoreFormatDiagnostics(doc, aType, supported, __func__); MSE_API("AddSourceBuffer(aType=%s)%s", NS_ConvertUTF16toUTF8(aType).get(), supported ? "" : " [not supported]"); if (!supported) { @@ -433,13 +449,16 @@ bool MediaSource::IsTypeSupported(const GlobalObject& aOwner, MOZ_ASSERT(NS_IsMainThread()); DecoderDoctorDiagnostics diagnostics; IgnoredErrorResult rv; - IsTypeSupported(aType, &diagnostics, rv); - bool supported = !rv.Failed(); nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aOwner.GetAsSupports()); + Document* doc = window ? window->GetExtantDoc() : nullptr; + IsTypeSupported( + aType, &diagnostics, rv, + doc ? Some(doc->ShouldResistFingerprinting(RFPTarget::MediaCapabilities)) + : Nothing()); + bool supported = !rv.Failed(); RecordTypeForTelemetry(aType, window); - diagnostics.StoreFormatDiagnostics(window ? window->GetExtantDoc() : nullptr, - aType, supported, __func__); + diagnostics.StoreFormatDiagnostics(doc, aType, supported, __func__); MOZ_LOG(GetMediaSourceAPILog(), mozilla::LogLevel::Debug, ("MediaSource::%s: IsTypeSupported(aType=%s) %s", __func__, NS_ConvertUTF16toUTF8(aType).get(), ===================================== dom/media/mediasource/MediaSource.h ===================================== @@ -83,7 +83,8 @@ class MediaSource final : public DOMEventTargetHelper, // Throws on aRv if not supported. static void IsTypeSupported(const nsAString& aType, DecoderDoctorDiagnostics* aDiagnostics, - ErrorResult& aRv); + ErrorResult& aRv, + Maybe<bool> aShouldResistFingerprinting); IMPL_EVENT_HANDLER(sourceopen); IMPL_EVENT_HANDLER(sourceended); ===================================== dom/media/mediasource/SourceBuffer.cpp ===================================== @@ -13,6 +13,7 @@ #include "mozilla/ErrorResult.h" #include "mozilla/FloatingPoint.h" #include "mozilla/Preferences.h" +#include "mozilla/dom/Document.h" #include "mozilla/dom/MediaSourceBinding.h" #include "mozilla/dom/TimeRanges.h" #include "mozilla/dom/TypedArray.h" @@ -385,13 +386,16 @@ void SourceBuffer::ChangeType(const nsAString& aType, ErrorResult& aRv) { // previously) of SourceBuffer objects in the sourceBuffers attribute of // the parent media source , then throw a NotSupportedError exception and // abort these steps. + Document* doc = mMediaSource->GetOwner() + ? mMediaSource->GetOwner()->GetExtantDoc() + : nullptr; DecoderDoctorDiagnostics diagnostics; - MediaSource::IsTypeSupported(aType, &diagnostics, aRv); + MediaSource::IsTypeSupported( + aType, &diagnostics, aRv, + doc ? Some(doc->ShouldResistFingerprinting(RFPTarget::MediaCapabilities)) + : Nothing()); bool supported = !aRv.Failed(); - diagnostics.StoreFormatDiagnostics( - mMediaSource->GetOwner() ? mMediaSource->GetOwner()->GetExtantDoc() - : nullptr, - aType, supported, __func__); + diagnostics.StoreFormatDiagnostics(doc, aType, supported, __func__); MSE_API("ChangeType(aType=%s)%s", NS_ConvertUTF16toUTF8(aType).get(), supported ? "" : " [not supported]"); if (!supported) { View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/8f7307a… -- View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/8f7307a… You're receiving this email because of your account on gitlab.torproject.org.
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 135
  • 136
  • 137
  • 138
  • 139
  • 140
  • 141
  • ...
  • 1860
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.