Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Real minor version is exposed in MB's non-RFP HTTP User-Agent header #386

Open
Jee-Hex opened this issue Jan 6, 2025 · 1 comment
Open

Comments

@Jee-Hex
Copy link

Jee-Hex commented Jan 6, 2025

Like Thunderbird, MB is currently exposing its real minor version in its HTTP User-Agent header whenever uBO initiates outgoing connections for filter lists updates, since RFP stopped affecting WebExtensions a while ago. If you visit moz-extension://[ublock-origin-webext-uuid]/dashboard.html#support.html in MB 14.0.3/14.5a1, you can see that uBO is reporting Firefox's real major version as 115, even though 14.0.3/14.5a1 is based on 128.5.0esr. I think this is because MB is failing uBO's check in https://github.com/gorhill/uBlock/blob/1.61.2/platform/common/vapi-common.js#L186-L187, since it's actual non-RFP User-Agent doesn't come with a Firefox/. And that in turn is probably due to the usage of export MOZ_APP_BASENAME=MullvadBrowser in https://gitlab.torproject.org/tpo/applications/mullvad-browser/-/issues/75.

Looking at https://searchfox.org/mozilla-esr128/source/netwerk/protocol/http/nsHttpHandler.cpp#391-392,863-874 (or bug 728831), it would appear that Firefox will only trim off the minor version and patch level in the Firefox/ part of its User-Agent. One way to "fix" this is to simultaneously remove https://searchfox.org/mozilla-esr128/source/netwerk/protocol/http/nsHttpHandler.cpp#869-875 and lock general.useragent.compatMode.firefox to true.

@PieroV
Copy link
Collaborator

PieroV commented Jan 7, 2025

Hi, thank you for the report and for the suggestions.
I'm going to open an issue on our GitLab and follow there.

EDIT: https://gitlab.torproject.org/tpo/applications/tor-browser/-/issues/43386

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants