Closed Bug 1433676 (general.useragent.override.[domain]) Opened 6 years ago Closed 5 years ago

Sub-Document fetches do NOT honor "general.useragent.override.[domain]" setting

Categories

(Core :: DOM: Core & HTML, defect, P5)

59 Branch
defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox58 --- wontfix
firefox59 --- wontfix
firefox60 - wontfix
firefox62 --- wontfix
firefox63 --- wontfix
firefox64 --- fix-optional

People

(Reporter: bugzilla, Unassigned)

References

Details

(Keywords: regression, Whiteboard: [fingerprinting][fp-triaged])

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
Build ID: 20180127100319

Steps to reproduce:

Use these in the admin.cfg file, or as normal prefs outside it.
----------------------------------------------------------------------------------------------------------------------
// We DONT want to use this because it modifies UserAgent tobe a Windows OS...
// This is also needed to prevent overides by this "feature" that could interfere...
lockPref(	'privacy.resistFingerprinting',					false	)
// Allow us to Fix UserAgent
lockPref(	'general.useragent.site_specific_overrides',	true		)
// Fix the UserAgent
// use any other domain instead of 'localhost' if you need to
lockPref(	'general.useragent.override.localhost',			'Mozilla/Nightly (Current; Test;)'	)
----------------------------------------------------------------------------------------------------------------------


Actual results:

With the above prefs used, navigate to any URL, on the domain as set in the prefs above.
You can check the usage of the UserAgent using the Network tab inside Developer Tools.
The pref-fixed UserAgent is only used in the main document fetched, eg the one entered in the URL-Bar
The *original/default* UserAgent will be used for sub-document fetches, eg. for scripts/images/etc loaded from that main document.



Expected results:

The pref-fixed UserAgent should be used as the default UserAgent for all sub-document fetches, except when explicitly set to something different in case of Ajax/fetch ofcourse :)
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Component: Untriaged → Preferences
Version: 60 Branch → 59 Branch
Just updated the branch because the same happens with Developer Edition
Thank you for the bug report. Can you use the mozregression tool (http://mozilla.github.io/mozregression/) to help us narrow down when this stopped working for you?

That tool has the potential to narrow down the point at which this stopped working to the exact change that broke it.
Flags: needinfo?(bugzilla)
Hmm i never worked with that tool before...
I'll try DL and install it on Debian 9.3 and see if i can get it to work.

PS: Before using this tool i just checked and seems my "FF-ESR 52.6.0" does not change the UserAgent at all with given config.
  - (Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 ID:20180123215146 CSet: Undefined
I just tried to start './mozregression-gui' after unpacking it in a directory as told, but i can't get it to work on Debian 9.3.

  - 1st try gave error:
> ./mozregression-gui: error while loading shared libraries: libssl.so.1.0.0: cannot open shared object file: No such file or directory
  - 2nd try after doing 'sudo apt-get install libssl1.0.0', gave errors again:
> /opt/firefox/mozregression-gui/mozregression-gui/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.0.1) doesn't match a supported version!
> Traceback (most recent call last):
>   File "/home/travis/build/mozilla/mozregression/venv/local/lib/python2.7/site-packages/cx_Freeze/initscripts/Console.py", line 27, in <module>
>   File "mozregui/main.py", line 7, in <module>
>   File "ExtensionLoader_PyQt4_QtGui.py", line 22, in <module>
>   File "ExtensionLoader_PyQt4_QtGui.py", line 14, in __bootstrap__
> ImportError: libQtGui.so.4: cannot open shared object file: No such file or directory

So at this point I'm uninstalling libssl1.0.0 and mozregression-gui again and giving up...
Flags: needinfo?(bugzilla) → needinfo?(jaws)
Ehsan, could this be fallout from bug 1347425?
Component: Preferences → DOM
Flags: needinfo?(jaws) → needinfo?(ehsan)
Product: Firefox → Core
Just checked on Android Nightly and same issue...
Alias: general.useragent.override.[domain
OS: Linux → All
Alias: general.useragent.override.[domain → general.useragent.override.[domain]
Hardware: x86_64 → All
Arthur Edelstein (Tor Browser dev), what is your p.o.v. on this?
Flags: needinfo?(arthuredelstein)
Indeed this looks like a fingerprinting problem. Thanks for bringing it to my notice. I haven't yet investigated how it will interact with privacy.resistFingerprinting.
Flags: needinfo?(arthuredelstein)
Whiteboard: [tor][fingerprinting]
(In reply to (away, backlogged on reviews) Jared Wein [:jaws] (please needinfo? me) from comment #5)
> Ehsan, could this be fallout from bug 1347425?

It is certainly possible but the bug doesn't provide enough information, so it's also possible that this has regressed by any other change!

Alice, is it possible that you can help us find a regression range for this please?  Thanks!
Flags: needinfo?(ehsan) → needinfo?(alice0775)
#1 Regression window:
Both Main-Document and Sub-Document are broken.

https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=3d40d270c031&tochange=c2b375f3a909

Regressed by:
	76a31c4050cc	Dão Gottwald — Bug 896114 - Don't initialize UserAgentOverrides on desktop. r=dolske


#2 Pertial fix:
Fixed for Main-Document. However, Sub-Document is still broken.

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=c8e078d00d470a4da27a61425404de90782d9943&tochange=ae40354e5a083eb11e1491028d0cdfe3be5e31a8

Pertial fixed by: 
	1f5e8370f845	Ehsan Akhgari — Bug 1351980 - Initialize and uninitialize UserAgentOverrides.jsm for Firefox; r=mconley
Flags: needinfo?(alice0775)
s/Pertial/Partial/g
Blocks: 896114, 1351980
Status: UNCONFIRMED → NEW
Ever confirmed: true
If this is a 5 year old regression, it doesn't seem worth tracking
@Julien, i guess if it was up to you you would label it wontfix period huh?
Maybe this hidden flaw should get more media attention to label firefox privacy insecure ?
Then finally Google Inc. will have won the battle vs Firefox by killing it at last....
Priority: -- → P5
Has STR: --- → yes
No longer depends on: 933959
Whiteboard: [tor][fingerprinting] → [fingerprinting][fp-triaged]
Component: DOM → DOM: Core & HTML

Since UserAgentOverrides.jsm was removed in bug 1513574, we can close this bug now. It's no longer applicable.

Status: NEW → RESOLVED
Closed: 5 years ago
Depends on: 1513574
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.