tor-browser

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

commit c1532e1f383ee8c7f09ea62693d71b5b17e64711
parent b60c22aec09d237a0f3211483c14ef30c5d3ef44
Author: Pier Angelo Vendrame <pierov@torproject.org>
Date:   Wed,  8 Jan 2025 10:54:13 +0100

BB 43386: Use Firefox in the UA in RFP-exempt request.

XHR requests initiated by extensions are exempt from RFP.
Therefore, they report the actual app name, instead of Firefox, and the
actual Firefox minor version.

This happens whenever the app name has been customized and does not
match a hardcoded "Firefox".

Diffstat:
Mnetwerk/protocol/http/nsHttpHandler.cpp | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netwerk/protocol/http/nsHttpHandler.cpp b/netwerk/protocol/http/nsHttpHandler.cpp @@ -1047,7 +1047,7 @@ void nsHttpHandler::BuildUserAgent() { mUserAgent += '/'; mUserAgent += mProductSub; - bool isFirefox = mAppName.EqualsLiteral("Firefox"); + bool isFirefox = true; if (isFirefox || mCompatFirefoxEnabled) { // "Firefox/x.y" (compatibility) app token mUserAgent += ' ';