Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 698414 - www-client/firefox-bin-70.0 makes it impossible to set custom network.trr.mode value
Summary: www-client/firefox-bin-70.0 makes it impossible to set custom network.trr.mod...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-23 19:25 UTC by Michał Ziąbkowski
Modified: 2019-10-31 16:01 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Ziąbkowski 2019-10-23 19:25:14 UTC
The firefox ebuild changes the default network.trr.mode settings to 5, in the interest of user choice and claiming that it can be changed back in the config, as per the elog message:

"Note regarding Trusted Recursive Resolver aka DNS-over-HTTPS (DoH):
Due to privacy concerns (encrypting DNS might be a good thing, sending all
DNS traffic to Cloudflare by default is not a good idea and applications
should respect OS configured settings), "network.trr.mode" was set to 5
("Off by choice") by default.
You can enable DNS-over-HTTPS in firefox's preferences."

Ironically, what really happens is that any change of said config key is overridden by 5 on each run, making it impossible to re-enable DNS-over-HTTPs.

The reasoning behind the TRR config change is understandable. However, the implementation as it is makes it impossible for the user to actually change config as they desire, which runs contrary to the intent behind the change.

Reproducible: Always

Steps to Reproduce:
1. Change network.trr.mode to anything other than 3 in about:config
2. Restart the browser
Actual Results:  
The value of network.trr.mode is overridden to 5.

Expected Results:  
The value network.trr.mode set by the user shouldn't be overridden.
Comment 1 Ionen Wolkens gentoo-dev 2019-10-23 20:54:50 UTC
User-side this "can" be solved by having a user.js in the firefox profile directory (syntax is same as prefs.js, so you can copy settings). I personally have it set all my important settings rather than manually since it both makes it easy to setup brand new profiles by just throwing the user.js in there, and also ensure no settings get randomly reverted for one reason or another.

That aside, whether this is a "good" solution to this problem or not is another story. Most people may not even know about it or want to dig in the profile directory manually. Not that I think many will want to change this particular value.
Comment 2 Ionen Wolkens gentoo-dev 2019-10-23 21:33:33 UTC
Hm, ignoring the above, I appear to be unable to reproduce. I tried on a blank profile (with no user.js, 70.0), set network.trr.mode to 2, restarted, and it was still set to 2.
Comment 3 Jory A. Pratt gentoo-dev 2019-10-24 00:46:46 UTC
I am unable to duplicate the failure. Are you sure you are the owner of the profile and permissions are correct?
Comment 4 Michał Ziąbkowski 2019-10-24 06:57:52 UTC
I'm positive my profile permissions are correct and I've also tried after purging ~/.mozilla/firefox. I still experience the issue. I set the value to 3, close browser and it resets itself to 5 on the next run.

I'm actually using firefox-bin. Might that be it? Having seen both the compiled and binary versions inject the same setting, I assumed it applies to both, hence the title. I wouldn't expect this aspect of the browser to work differently between versions.
Comment 5 Ionen Wolkens gentoo-dev 2019-10-24 07:52:40 UTC
I gave firefox-bin a try and am now able to reproduce this.

It's indeed set for both but the method is a bit different, with the compiled version all-gentoo.js (which sets this) is builtin omni.ja. For firefox-bin, defaults/pref/local-settings.js is used to load it. Maybe firefox uses a different priority when loading those, not that I'm familiar with how it handles this.
Comment 6 Michał Ziąbkowski 2019-10-24 08:28:57 UTC
Actually, reading through all-gentoo.js provides a solution:
pref("network.trr.mode", 5); needs to be changed to defaultPref("network.trr.mode", 5);

This way the default itself seems to be changed to 5, rather than overriding the value on each run. So if the user hasn't changed the value on their own, it will be set to 5. If they have, their changes won't be overridden.

In fact, both "pre" settings are preceded by the following comment: "Preferences that should be reset every session" and that's exactly what this issue is about.

Thus, I suggest that pref be changed to defaultPref for this setting in order to respect the user's choice rather than force the value.
Comment 7 Larry the Git Cow gentoo-dev 2019-10-31 16:01:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=344530e5c342449fc79afdddc9f0ab504875ede0

commit 344530e5c342449fc79afdddc9f0ab504875ede0
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-10-31 16:01:13 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-10-31 16:01:13 +0000

    www-client/firefox-bin: use defaultPref for network.trr.mode
    
    Closes: https://bugs.gentoo.org/698414
    Package-Manager: Portage-2.3.78, Repoman-2.3.17
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 www-client/firefox-bin/files/all-gentoo-3.js                            | 2 +-
 .../firefox-bin/{firefox-bin-70.0.ebuild => firefox-bin-70.0-r1.ebuild} | 0
 2 files changed, 1 insertion(+), 1 deletion(-)