A kind reminder we would like all registered users to weigh in on one of our forum's security policies.
Please take a moment to read this thread and place a vote.
https://forum.palemoon.org/viewtopic.php?f=17&t=32935

general.useragent.override - how to set?

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
User avatar
suseuser04
Moongazer
Moongazer
Posts: 13
Joined: 2019-03-25, 14:04

general.useragent.override - how to set?

Post by suseuser04 » 2020-11-13, 20:23

Hello:

I am puzzled by general.useragent.override and general.useragent.override.domain.name settings.

Which one has preference over the other?

In my experience setting general.useragent.override has preference over all
general.useragent.override.domain.name settings.

Can you enlighten me how I supposed to set these if I want eg set specific overrides for specific domains
(eg youtube.com) and a general one for all the domains which are not set specifically?

Thanks,

suseuser

User avatar
Pentium4User
Board Warrior
Board Warrior
Posts: 1329
Joined: 2019-04-24, 09:38

Re: general.useragent.override - how to set?

Post by Pentium4User » 2020-11-13, 20:59

Code: Select all

general.useragent.override.addons.mozilla.org
for addons.mozilla.org for example.
You can open about:config and then you see the default overrides.

Same happens for youtube.com
The profile picture shows my Maico EC30 E ceiling fan.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2487
Joined: 2018-05-05, 13:29

Re: general.useragent.override - how to set?

Post by vannilla » 2020-11-13, 21:10

Use Sasuga: https://addons.palemoon.org/addon/sasuga/
It was created exactly with the purpose of helping out those people that don't know how to (or don't want to) work with the raw settings.

User avatar
jars_
Lunatic
Lunatic
Posts: 427
Joined: 2016-12-27, 00:12

Re: general.useragent.override - how to set?

Post by jars_ » 2020-11-13, 21:39


User avatar
suseuser04
Moongazer
Moongazer
Posts: 13
Joined: 2019-03-25, 14:04

Re: general.useragent.override - how to set?

Post by suseuser04 » 2020-11-14, 13:35

Thank for your answers.

Unfortunately the subject title is misleading, and I only realized it when I read the answers.

I do know how to go to about:config and how to set key/value pairs.

What I don't understand how general.useragent.override and
general.useragent.override.domain.name (eg general.useragent.override.youtube.com)
are related. In what order are they applied? I would expect that it goes from the more
specific to the less specific, that is if a domain name rule is found it is applied first,
and if a domain name is not found, then general.useragent.override applies. But in
my experience if I set general.useragent.override it overrides all
general.useragent.override.domain.name rule. For example if I set
general.useragent.override.youtube.com to a value that works with youtube, and
general.useragent.override to a value that doesn't work with youtube, youtube site will not work.

The question is how I can set a basic override rule which applies only if there is no override rule for a specific domain.

Thanks,

suseuser

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2487
Joined: 2018-05-05, 13:29

Re: general.useragent.override - how to set?

Post by vannilla » 2020-11-14, 13:40

What you should do is reset the "general.useragent.override" preference, restart, then use only domain-specific overrides.
If you saw in practice that the generic override takes precedence over the domain-specific ones, then that's how it works.
You can't have a general override because there's no need to: domain-specific overrides are necessary only when a site does a terrible UA sniffing, for everything else you don't need it but rather keep the Pale Moon/Basilisk name so that webmasters will discover the existance if this browser.

User avatar
suseuser04
Moongazer
Moongazer
Posts: 13
Joined: 2019-03-25, 14:04

Re: general.useragent.override - how to set?

Post by suseuser04 » 2020-11-14, 16:47

Thanks.

> rather keep the Pale Moon/Basilisk name so that webmasters will discover the existance if this browser.

That's what I don't want to do. I don't want websites to know my exact browser/operating system.
And I cannot set a site specific override to every site I visit.

suseuser

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38503
Joined: 2011-08-28, 17:27
Location: Sweden

Re: general.useragent.override - how to set?

Post by Moonchild » 2020-11-14, 17:40

suseuser04 wrote:
2020-11-14, 16:47
I don't want websites to know my exact browser/operating system.
For better or for worse, a lot of sites have to know your browser by user agent because they don't do feature-detection and are still stuck in the 90s doing ua sniffing (needed back then because of MSIE and because better ways of detecting features didn't exist yet -- no excuse now). If you don't want that, then you are going to have to lie about your browser one way or another, and as a result websites will break by serving you content specifically catered to the browser you are pretending to be. You'll have to consider what you find more important: them knowing your browser by ua or websites not breaking.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
suseuser04
Moongazer
Moongazer
Posts: 13
Joined: 2019-03-25, 14:04

Re: general.useragent.override - how to set?

Post by suseuser04 » 2020-11-14, 18:46

Thanks.

I do know all of that. Still I would like to know how the general.userage.override rules supposed to
work, which one has precedence. If site settings does not have precedence over general.userage.override
setting, then what is the role of general.userage.override at all? I would like to understand it.
None of the previous answers explained it. If you cannot answer that, please point me somewhere I
can find the answer.

Thanks,

suseuser

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2487
Joined: 2018-05-05, 13:29

Re: general.useragent.override - how to set?

Post by vannilla » 2020-11-14, 19:31

It has been explained:
vannilla wrote:
2020-11-14, 13:40
If you saw in practice that the generic override takes precedence over the domain-specific ones, then that's how it works.
What we are trying to tell you is that you either tell everyone you are using Pale Moon and lie only to a selected list of broken website, or you tell everyone you are not using Pale Moon and avoid visiting those broken website, assuming you can do it in the first place. For example you can't use YouTube since it will be broken.

User avatar
suseuser04
Moongazer
Moongazer
Posts: 13
Joined: 2019-03-25, 14:04

Re: general.useragent.override - how to set?

Post by suseuser04 » 2020-11-14, 20:09

OK, I guess now I see.


quote:

> If you saw in practice that the generic override takes precedence over the domain-specific ones, then that's how it works.

According to this it is not possible to spoof a general useragent which is overwritten for specific sites. I expected that it should
work like that.

Thanks.

suseuser

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38503
Joined: 2011-08-28, 17:27
Location: Sweden

Re: general.useragent.override - how to set?

Post by Moonchild » 2020-11-14, 22:24

suseuser04 wrote:
2020-11-14, 20:09
According to this it is not possible to spoof a general useragent which is overwritten for specific sites. I expected that it should
work like that.
Actually expected this return :)

The thing is, if you want to override what you present yourself as, you'd expect that to happen everywhere, not selectively -- otherwise it's not performing its intended purpose of faking your presence as something else. Thus, a blanket general.useragent.override will override site-specific defaults the browser comes with, to make your fake UA not leak anything else to websites.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: general.useragent.override - how to set?

Post by New Tobin Paradigm » 2020-11-15, 10:28

general.useragent.override, the global pref, needs to be exterminated.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38503
Joined: 2011-08-28, 17:27
Location: Sweden

Re: general.useragent.override - how to set?

Post by Moonchild » 2020-11-15, 12:35

I'm fine with that. Alternative extensions should handle changing request headers directly, instead.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: general.useragent.override - how to set?

Post by New Tobin Paradigm » 2020-11-15, 12:49

If someone has the skillz, that could be one kickass extension actually. Handle site-specific and do granular fix ups on a per-request basis.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38503
Joined: 2011-08-28, 17:27
Location: Sweden

Re: general.useragent.override - how to set?

Post by Moonchild » 2020-11-15, 12:53

I'm sure people have the skillz for that
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: general.useragent.override - how to set?

Post by New Tobin Paradigm » 2020-11-15, 13:11

*feedback* Paging moonbat or vanilla, upgrade needed in extensions, upgrade need in extensions. *chhhk*

JustOff

Re: general.useragent.override - how to set?

Post by JustOff » 2020-11-15, 13:21

The point is, it's not only about request headers, but also about the navigator object. And being able to control general.buildID.override, general.oscpu.override, and general.useragent.override is pretty important for setting up a privacy-enhanced environment. Please don't cut it out of the browser core.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 5714
Joined: 2015-12-09, 15:45

Re: general.useragent.override - how to set?

Post by moonbat » 2020-11-15, 13:40

New Tobin Paradigm wrote:
2020-11-15, 13:11
*feedback* Paging moonbat or vanilla, upgrade needed in extensions, upgrade need in extensions. *chhhk*
Roger.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
KDE Neon on a Slimbook Excalibur (Ryzen 7 8845HS, 64 GB RAM)
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX
Jabber: moonbat@hot-chili.net

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 38503
Joined: 2011-08-28, 17:27
Location: Sweden

Re: general.useragent.override - how to set?

Post by Moonchild » 2020-11-15, 13:43

JustOff wrote:
2020-11-15, 13:21
The point is, it's not only about request headers, but also about the navigator object. And being able to control general.buildID.override, general.oscpu.override, and general.useragent.override is pretty important for setting up a privacy-enhanced environment.
Actually, for web compatibility reasons, it is about request headers. The blanket override is a terrible footgun.
Also, I don't actually see why we need overrides for buildID and oscpu outside of a testing/debugging environment. If you want to toss it up for privacy, then you may as well demand we add pref overrides for all the other properties of the Navigator object.
"There is no point in arguing with an idiot, because then you're both idiots." - Anonymous
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite