Set a Firefox user agent for our Icecat build

  • Done
  • quality assurance status badge
Details
3 participants
  • Arun Isaac
  • Efraim Flashner
  • Maxim Cournoyer
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 16 Nov 2020 07:17
(address . bug-guix@gnu.org)
87wnylhll7.fsf@systemreboot.net
Hi,

Many sites---jitsi among many others---don't work properly when they see
an Icecat user agent. Instead, when the user agent is set to a Firefox
user agent, these sites work as expected. Users can do this manually by
installing user agent switching extensions such as uaswitcher, but it
would be much better if our Icecat package, by default, came with a
Firefox user agent, and everything worked normally without any user
intervention.

This bug report arose out of a discussion on help-guix. See

I would normally volunteer a patch, but building Icecat takes too long
(> 24 hours) on my slow computer. It would be nice if someone with a
faster build machine handled this.

Thanks,
Arun
M
M
Maxim Cournoyer wrote on 5 Aug 2021 05:22
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 44678@debbugs.gnu.org)
87mtpwmv71.fsf@gmail.com
Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> writes:

Toggle quote (17 lines)
> Hi,
>
> Many sites---jitsi among many others---don't work properly when they see
> an Icecat user agent. Instead, when the user agent is set to a Firefox
> user agent, these sites work as expected. Users can do this manually by
> installing user agent switching extensions such as uaswitcher, but it
> would be much better if our Icecat package, by default, came with a
> Firefox user agent, and everything worked normally without any user
> intervention.
>
> This bug report arose out of a discussion on help-guix. See
> https://lists.gnu.org/archive/html/help-guix/2020-11/msg00082.html
>
> I would normally volunteer a patch, but building Icecat takes too long
> (> 24 hours) on my slow computer. It would be nice if someone with a
> faster build machine handled this.

I thought the default user agent was already that of Firefox for Windows
(!), purportedly to make it less unique (thus making fingerprinting of
browsers/users more difficult).

Isn't it the case? I changed mine long ago so I don't remember (to
please some broken site).

Thank you,

Maxim
E
E
Efraim Flashner wrote on 5 Aug 2021 10:00
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)
YQuas/A57pRYiTSu@3900XT
On Wed, Aug 04, 2021 at 11:22:58PM -0400, Maxim Cournoyer wrote:
Toggle quote (32 lines)
> Hi Arun,
>
> Arun Isaac <arunisaac@systemreboot.net> writes:
>
> > Hi,
> >
> > Many sites---jitsi among many others---don't work properly when they see
> > an Icecat user agent. Instead, when the user agent is set to a Firefox
> > user agent, these sites work as expected. Users can do this manually by
> > installing user agent switching extensions such as uaswitcher, but it
> > would be much better if our Icecat package, by default, came with a
> > Firefox user agent, and everything worked normally without any user
> > intervention.
> >
> > This bug report arose out of a discussion on help-guix. See
> > https://lists.gnu.org/archive/html/help-guix/2020-11/msg00082.html
> >
> > I would normally volunteer a patch, but building Icecat takes too long
> > (> 24 hours) on my slow computer. It would be nice if someone with a
> > faster build machine handled this.
>
> I thought the default user agent was already that of Firefox for Windows
> (!), purportedly to make it less unique (thus making fingerprinting of
> browsers/users more difficult).
>
> Isn't it the case? I changed mine long ago so I don't remember (to
> please some broken site).
>
> Thank you,
>
> Maxim

I remember a discussion forever ago about making the User-Agent Guix
specific but we ended up not going that way in order to try to provide
more anonymity. I don't believe I've changed my user agent ever, and
here's what I'm told mine is:

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

If you want to experiment with it you can send a patch (and tag me) and
I'll build icecat locally and check it out and let you know how it goes.
Icecat builds fairly quickly for me.

--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmELmrIACgkQQarn3Mo9
g1F17g/8C3bLON7diTlFVOyCYEA/vYvi1O4XrbwSTjDD9Zed+YdSxbE6R8busAXo
lQXklPVnp5ScZE6JdOhQS26W/AWF2oUMZy3nNsWdhgeTJuz3tmSVZIBWw0BJvkgW
G5tlcb0DMHFn0SCapnAIbF2CJIIMAadlJeqAp+NeJFb0XV3LRhSW8OSjYLaIyXLD
TZJhE/NTY4LlmbLMTCX09bAkVbpY3YzyfEvDS63ufK0//z2SIM0xHIeYjCeM2wzB
xSuGjqaGccVPCYvlpH5L9sJ8W9mC6W/llHRmTRnDFuNZryOb/UoTwCwuOEJ1bN/U
Og2Rveu765vCTYDyXqD8xy66D85gzH//xBK2AsXsJnA9ldwBMXfZH61tw35FSdBU
R68ARAg5T4rVcF6/2Kdh2/WhjADLdAEZR+zEP7o7RDwZUWuDlhomq2DxmT4aAVdY
0QpvbfoZsBbVSYmVnONh70QNHnuA+cMAb8gkNwxrrRp1uDX0WCaYx+gy8xVzkfTg
rGQ7eWEZ3GoeYwppnNUnxxUu35dyJ4OI2IZxIK1dywkokDnqeXA91YCJ6f/aMDOg
93nFCXjLZOTsfXnK8tD8ECOX/L0G7i5GF7HpNgcMHSrxqlvL8TAWRWBZl9NhdwsH
RBL4I+v2I59KF6Jd1nFD8ybb7w3vJ0zjNJSlJrWVb+lHQoyKyRg=
=58V2
-----END PGP SIGNATURE-----


M
M
Maxim Cournoyer wrote on 5 Aug 2021 18:48
(name . Efraim Flashner)(address . efraim@flashner.co.il)
87bl6b96sz.fsf@gmail.com
Hello,

Efraim Flashner <efraim@flashner.co.il> writes:

Toggle quote (44 lines)
> On Wed, Aug 04, 2021 at 11:22:58PM -0400, Maxim Cournoyer wrote:
>> Hi Arun,
>>
>> Arun Isaac <arunisaac@systemreboot.net> writes:
>>
>> > Hi,
>> >
>> > Many sites---jitsi among many others---don't work properly when they see
>> > an Icecat user agent. Instead, when the user agent is set to a Firefox
>> > user agent, these sites work as expected. Users can do this manually by
>> > installing user agent switching extensions such as uaswitcher, but it
>> > would be much better if our Icecat package, by default, came with a
>> > Firefox user agent, and everything worked normally without any user
>> > intervention.
>> >
>> > This bug report arose out of a discussion on help-guix. See
>> > https://lists.gnu.org/archive/html/help-guix/2020-11/msg00082.html
>> >
>> > I would normally volunteer a patch, but building Icecat takes too long
>> > (> 24 hours) on my slow computer. It would be nice if someone with a
>> > faster build machine handled this.
>>
>> I thought the default user agent was already that of Firefox for Windows
>> (!), purportedly to make it less unique (thus making fingerprinting of
>> browsers/users more difficult).
>>
>> Isn't it the case? I changed mine long ago so I don't remember (to
>> please some broken site).
>>
>> Thank you,
>>
>> Maxim
>
> I remember a discussion forever ago about making the User-Agent Guix
> specific but we ended up not going that way in order to try to provide
> more anonymity. I don't believe I've changed my user agent ever, and
> here's what I'm told mine is:
>
> User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0
>
> If you want to experiment with it you can send a patch (and tag me) and
> I'll build icecat locally and check it out and let you know how it goes.
> Icecat builds fairly quickly for me.

Thanks for the information. I got curious and did some archeology in
the gnuzilla repository [0] and found the commit that made Windows NT user
agent string go away:

Toggle snippet (51 lines)
a25c630a21d78be6515648d8d65cf13fb633c3b5
Author: Ruben Rodriguez <ruben@gnu.org>
AuthorDate: Thu Sep 13 20:47:06 2018 -0400
Commit: Ruben Rodriguez <ruben@gnu.org>
CommitDate: Thu Sep 13 21:02:13 2018 -0400

Parent: f70c9f0 Some customizations to the UI
Contained: master
Follows: v52.1.0 (21)
Precedes: v60.2.0 (3)

Preserve Firefox as UserAgent

1 file changed, 8 insertions(+), 2 deletions(-)
makeicecat | 10 ++++++++--

modified makeicecat
@@ -405,6 +405,11 @@ sed 's/mozilla-bin/icecat-bin/' -i build/unix/run-mozilla.sh
find -type f | grep run-mozilla | xargs prename s/mozilla/icecat/
+# do not alter useragent/platform/oscpu/etc with fingerprinting countermeasure, it makes things worse
+sed '/ShouldResistFingerprinting/,/}/s/^/\/\//' -i ./netwerk/protocol/http/nsHttpHandler.cpp
+sed '/If fingerprinting resistance is on/,/}/s/^/\/\//' -i ./dom/base/Navigator.cpp
+
+# Leave user agent as Firefox
sed "/MOZILLA_UAVERSION/ s:IceCat/:Firefox/:" -i netwerk/protocol/http/nsHttpHandler.cpp
find . -name region.properties |xargs -i /bin/sed 's_https://www.mibbit.*__' -i {}
@@ -421,9 +426,9 @@ cat << EOF >> browser/app/profile/icecat.js
// Set useragent to Firefox compatible
//pref("general.useragent.compatMode.firefox",true);
// Spoof the useragent to a generic one
-pref("general.useragent.compatMode.firefox",true);
+//pref("general.useragent.compatMode.icecat",true);
// Spoof the useragent to a generic one
-pref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:${FFMAJOR}.0) Gecko/20100101 Firefox/${FFMAJOR}.0");
+//pref("general.useragent.override", "Mozilla/5.0 (Windows NT 6.1; rv:${FFMAJOR}.0) Gecko/20100101 Firefox/${FFMAJOR}.0");
pref("general.appname.override", "Netscape");
pref("general.appversion.override", "${FFMAJOR}.0");
pref("general.buildID.override", "Gecko/20100101");
@@ -433,6 +438,7 @@ EOF
cat << EOF >> browser/confvars.sh
# IceCat settings
+MOZ_APP_UA_NAME=IceCat
MOZ_APP_VENDOR=GNU
MOZ_APP_VERSION=$FFVERSION
MOZ_APP_PROFILE=mozilla/icecat

Closing.

Thanks,

Maxim

[0] git://git.savannah.gnu.org/gnuzilla.git
Closed
A
A
Arun Isaac wrote on 16 Aug 2021 20:21
(name . Maxim Cournoyer)(address . maxim.cournoyer@gmail.com)(address . 44678@debbugs.gnu.org)
87fsv945em.fsf@systemreboot.net
Hi Maxim,

Toggle quote (4 lines)
> I thought the default user agent was already that of Firefox for Windows
> (!), purportedly to make it less unique (thus making fingerprinting of
> browsers/users more difficult).

Sorry, I'm replying rather late. I just disabled the "User-Agent
Switcher" addon in my Icecat, and found that the default user agent is
"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Firefox/78.0". So, I guess this bug is addressed.

Thank you,
Arun
-----BEGIN PGP SIGNATURE-----

iQFPBAEBCAA5FiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAmEarKEbHGFydW5pc2Fh
Y0BzeXN0ZW1yZWJvb3QubmV0AAoJEC4l7othgCuzmhMH/AmalesYO33b++nvHfFj
/Y+/r1LxsgGPJytXzG5GgJYDITpH1xOvCxBro1RLcEngrGwnVap0+9R4oYWX40LZ
1NjndIAAykqBaTTit/Zp556FL7MFTezGWUw15myPMKBuGrVNh34Mngkc2i4WDycq
PIiXAXFBByxROCI6m92i4QpaZ6jRvOW1og0XTjraR7YQa5eOT6LWz7ZMEDI67a1L
UApmSRWOkkxGexvBiRgapSh2AUh/KXij5DtUjjiZh+dXmg7gGu/PkbZGPjEPqOzg
VGyhE9b3JEPY19xHnHMgf77Im0Y3cM6hADg7ERo1fKIw4/iva8oGYybmWlN+tckZ
x28=
=WIOV
-----END PGP SIGNATURE-----

?