tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b6c808f722238888fd45514a53759ac2786f7166
parent ef2c34c88238e8f825056cd3f926d933e7e5f83e
Author: Jan-Niklas Jaeschke <jjaschke@mozilla.com>
Date:   Wed, 10 Dec 2025 13:36:12 +0000

Bug 2005191: Check pref before running strip-for-share algorithm. r=manuel

Differential Revision: https://phabricator.services.mozilla.com/D275776

Diffstat:
Mtoolkit/components/antitracking/URLQueryStringStripper.cpp | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/toolkit/components/antitracking/URLQueryStringStripper.cpp b/toolkit/components/antitracking/URLQueryStringStripper.cpp @@ -467,6 +467,11 @@ int URLQueryStringStripper::TryStripValue(const nsACString& aHost, nsresult URLQueryStringStripper::StripForCopyOrShareInternal( nsIURI* aURI, nsIURI** aStrippedURI, int& aStripCount, bool aDry, bool aStripNestedURIs) { + if (!StaticPrefs::privacy_query_stripping_strip_on_share_enabled()) { + aStripCount = 0; + return NS_OK; + } + nsAutoCString query; nsresult rv = aURI->GetQuery(query); NS_ENSURE_SUCCESS(rv, rv);