Bug 277368 - www/firefox 123.0 incorrectly speciffies Linux as OS instead of FreeBSD in the User Agent string
Summary: www/firefox 123.0 incorrectly speciffies Linux as OS instead of FreeBSD in th...
Status: Closed Works As Intended
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Christoph Moench-Tegeder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-28 02:38 UTC by gebhart
Modified: 2024-05-25 21:49 UTC (History)
10 users (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gebhart 2024-02-28 02:38:18 UTC
It's not a severe bug, but quite annoying:
I wondered why www/p5-HTTP-BrowserDetect reports Linux instead of FreeBSD and started to debug that until I realised that not the perl module was wrong, but the User Agent string of firefox actually reports:

"Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0"

It's not Linux of course, but FreeBSD 13.2-RELEASE (and also not x86_64 but amd64)
I could not verify so far if it is an upstream bug or somewhere in the port unfortunately.
Comment 1 gebhart 2024-02-28 02:42:13 UTC
I just realised that www/iridium has the same bug, maybe it's related. It reports:

"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.6099.224 Safari/537.36"

Same machine with 13.2-RELEASE on amd64 .
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2024-02-28 11:16:50 UTC
It was "Mozilla/5.0 (X11; FreeBSD amd64; rv:xxx.0) Gecko/20100101 Firefox/xxx.0" before and now it's "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0".
But I had to set "general.useragent.override" to "Mozilla/5.0 (X11; Linux x86_64; FreeBSD amd64; rv:199.0) Gecko/20100101 Firefox/199.0" to stop stupid messages like "Your OS isn't supported" on some sites.
Comment 3 Charlie Li freebsd_committer freebsd_triage 2024-02-29 02:36:57 UTC
This is intentional.

In ports 5f83a8cdba544023d975dd1da704ac833836a062, Mozilla Add-Ons search was masked as Linux as many new add-ons and updates would never populate due to platform check warts. In ports ab146876a894c84256e94c43b6955b2a2ad49313, this was extended to the entire User-Agent.
Comment 4 gebhart 2024-03-08 18:33:22 UTC
I might be wrong, but I think, it would be better to solve the original problem instead of introducing some new. eg. the Mozilla addon stuff etc.
It really breaks all kind of statistics, the visibility of FreeBSD and in some cases even webserver access.
Even if some stupid websites sort FreeBSD in as a Linux distro, it's not and hopefully will never be.
Comment 5 Charlie Li freebsd_committer freebsd_triage 2024-03-09 09:04:35 UTC
Unfortunately the original problem can only be solved by extension authors and Mozilla themselves, which is a pipe dream at best considering we are Tier-3 to them.

https://firefox-source-docs.mozilla.org/contributing/build/supported.html
Comment 6 Tomasz "CeDeROM" CEDRO 2024-03-10 21:11:30 UTC
This is unacceptable solution and makes FreeBSD completely disappear from the web!


My browser is reported as "Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0".

Please revert.
Comment 7 Christoph Moench-Tegeder freebsd_committer freebsd_triage 2024-03-10 21:13:38 UTC
That was intentional in upstream:
https://bugzilla.mozilla.org/show_bug.cgi?id=1861847
Comment 8 Tomasz "CeDeROM" CEDRO 2024-03-10 21:19:14 UTC
OMG :-(
Comment 9 Neel Chauhan freebsd_committer freebsd_triage 2024-03-11 17:36:18 UTC
As an unpopular opinion, writing Linux as the user agent actually makes sense. Many web developers are clueless about non-Top 4 (Windows, Mac, Linux, and Chrome OS). In fact, I know of many software engineers who don't know what FreeBSD is.

Once upon a time, developers only cared for the Top 2 (Windows and Mac) until Linux and Chromebooks became more popular.

While I no longer daily drive FreeBSD, this isn't very new. macOS on Apple Silicon says x86_64 in the user agent, and Fedora Asahi Remix (which I am using to type this) does this too. Tor Browser goes further and puts in a Windows user agent for everyone.

Chase Bank in the US has long blocked FreeBSD from online banking, claiming to "require" Windows or Mac, but allows Linux and Chrome OS due to the sheer size of both. This move means FreeBSD users can use Chase online banking without plugins since to Chase you're "Linux".

I also had a landlord which used a site builder which did the same, but fortunately the portal to pay rent and put in service requests were unblocked.