sailfishos / sailfish-browser

Sailfish Browser
https://github.com/sailfishos/sailfish-browser/wiki/Sailfish-Browser-wiki
Mozilla Public License 2.0
307 stars 87 forks source link

Set a new default override UA #1070

Closed attah closed 1 month ago

attah commented 2 months ago

Unless i messed something up, the default-ish UA in the overrides (the one for most sites) has 78 in it - and also Android 8. Apparently we do need t lie to some websites, but shouldn't it at least say 91?

attah commented 2 months ago

Maybe something like Mozilla/5.0 (Android 12; Mobile; rv:91.0) Gecko/91.0 Firefox/91.0? Supposedly it has been seen in the wild: https://myip.ms/view/comp_browseragents/2808495/Mozilla_5_0_Android_12_Mobile_rv_91_0_Gecko_91_0_Firefox_91_0.html

rainemak commented 2 months ago

It should be automatic given that all patches are applied properly.

https://github.com/sailfishos/gecko-dev/commit/51d6136d5f5aaa2d9b09af63b9ad6d3ff514e654

We changed to use OS agnostic user-agent back in 2020 by usign -DMOZ_UA_OS_AGNOSTIC=1
https://github.com/sailfishos/gecko-dev/commit/17df02bdd4a65f4c90a4426b9190d020f6c3f3b5

On Sailfish OS gecko repository you can run something like:

git log --author="Raine" --grep="user"

attah commented 2 months ago

Excellent! Then we probably just found a missing patch then. Or wait... i'm confused - i'm talking about overrides here - i.e. what's in ua-update.json - which can be wildly different - so does this still apply?

attah commented 2 months ago

Definitely missing at least one of those patches. My UA reports as Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Firefox/91 So with that sorted, this other issue may be redundant: https://github.com/sailfishos/sailfish-browser/issues/1069

rainemak commented 2 months ago

@attah that's correct analysis. It's now-a-days 0068-sailfishos-gecko-Start-using-user-agent-builder.-JB-.patch that we're lacking.

rainemak commented 1 month ago

Fixed here https://github.com/sailfishos/gecko-dev/pull/162/commits/46b42fdb72f1b9c94293bd77a1af789f03858ae2#diff-32f186c0ac568a4e9f672fccb51a5ac9201984e5efe08b94944b7dee5f4b6627