Opened 11 years ago

Last modified 11 years ago

#908 closed defect (Fixed)

User Agent Switcher resets Torbutton's spoofed user agent

Reported by: rollanothernumber Owned by:
Priority: Low Milestone:
Component: Applications/Torbutton Version: 1.2.0rc5
Severity: Keywords:
Cc: rollanothernumber, arma, mikeperry Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

In Debian with Iceweasel 3.0.4-1 the Addon Torbutton (1.2.0) does not change the User Agent of the Browser.

Other Addons I'm using: AdBlock Plus (1.0.1), RefControl (0.8.11), Mouse Gestures Redox (2.0.2) and
User Agent Switcher (0.6.11). I tested, if the user agent is changed if the last mentioned addon is disabled -
but this had no effect:
Always my same full User Agent is shown like this:
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008112309 Iceweasel/3.0.4 (Debian-3.0.4-1)

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Attachments (2)

tor-user-agent.jpg (238.9 KB) - added by rollanothernumber 11 years ago.
screenshot of my browsers about:config dialog
torbutton-1.2.0-dev.xpi.8 (287.7 KB) - added by mikeperry 11 years ago.
Fix to reset useragent if tor is enabled at startup.

Download all attachments as: .zip

Change History (15)

Changed 11 years ago by rollanothernumber

Attachment: tor-user-agent.jpg added

screenshot of my browsers about:config dialog

comment:1 Changed 11 years ago by rollanothernumber

http://www.showmyip.com/?version=full
shows:

Browser (User-Agent):
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/2008112309 Iceweasel/3.0.4 (Debian-3.0.4-1)

but besides this:
CPU class/type: OS/CPU Windows NT 5.1

and:
Operating System Platform (via Javascript method 1):
Linux i686
Linux

comment:2 Changed 11 years ago by mikeperry

Does user agent switcher properly change your user agent?

comment:3 Changed 11 years ago by rollanothernumber

Yes. User Agent Switcher works fine.

comment:4 Changed 11 years ago by mikeperry

What if you start up firefox with a fresh profile with just Torbutton? Does it still fail to set the useragent?

Doing: firefox -no-remote -P

will give you a new firefox process with the profiles window open to create a new profile/select a blank one that
you can install Torbutton on.

comment:5 Changed 11 years ago by rollanothernumber

With a new profile, only using Torbutton, my user-agent looks like this:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16

So: Yes, it works!

After that, I installed 'User Agent Switcher' and the same rewritten user-agent is shown again. Adding AdBlock Plus and RefControl after that showed no bad effect.

I removed and re-installed User-Agent-Switcher into my default Tor-profile - and everything works fine there, too!
I have no idea why... but now it works again... Thanks!

comment:6 Changed 11 years ago by rollanothernumber

Now it's getting odd:

If I switch my user agent with User Agent Switcher to another agent once, then setting it back to default, my real agent is shown again.

Only removing User Agent Switcher is clearing this settings.
It seems, you should avoid using this Addon if Torbutton ever should manage this by its own.

comment:7 Changed 11 years ago by mikeperry

Does this only happen at startup, or have you noticed it randomly? I've just added some code
to reset it at startup for Tor-enabled mode. Can you check out the attached .xpi and let me know?

Changed 11 years ago by mikeperry

Attachment: torbutton-1.2.0-dev.xpi.8 added

Fix to reset useragent if tor is enabled at startup.

comment:8 Changed 11 years ago by rollanothernumber

With your new Version, I can reset the settings of the User Agent Switcher by restarting Iceweasel, or turning Tor-usage off and on again with Torbutton.

If I'm using the User Agent Switcher, and then setting my Agent back to 'default', my real Agent is shown - as long as I'm switching Torbutton off/on, or restarting Iceweasel: Then Torbutton controls this again.

I think this means, the UserAgentSwitcher should not be allowed to use the 'default' User Agent from it's menu - or the one from Torbutton has to pretend to be the default one.

So, there is no randomness - it happens always by setting defaults in User Agent Switcher Addon

comment:9 Changed 11 years ago by mikeperry

Hrmm, I was conflicted about adding code for that. I was thinking some users may want to use user agent switcher
to reset their user agent to normal during Tor usage so they can download software that is localized by OS, etc..
I can already see the next bug report if I disable it: "Torbutton disables the 'default' button of UserAgentSwitcher
when enabled" if I disable it.

Do you think "Don't do that, then?" is an acceptable response, or is there some reason the UI encourages users to
randomly mash that 'Default' button when using Tor and expect it to still be safe?

comment:10 Changed 11 years ago by rollanothernumber

Hmm, you're right - for some users it could be necessary to switch to their real user agent...
Until now I thought the other way: I switched with UserAgentSwitcher to download software localized by OS - and wanted to get back to normal Torbutton-mode by pressing the default-button.

Possibly there is no reason for this behaviour... why should one want to switch back from one faked user agent to another faked one?

It's good to know, that UserAgentSwitchers 'default' does not stand for Torbuttons default. I was thinking, Torbutton disables 'bad' settings of other Addons or rewrites them - in a way that the most possible information of the user's system stays hidden. (Another thought: there could be a setting in Torbutton, like: Don't change my UserAgent?)

I don't know, what the most users would say about this - but sure, I can live with resetting the User Agent with every Torbutton-toggle. Without your new feature, it was not possible to get back letting Torbutton handle the UserAgent, until UserAgentSwitcher was completely removed.

So this helps a lot already: Thanks!

comment:11 Changed 11 years ago by mikeperry

Actually, I think your use case is probably the more common one. People will expect default to reset to the
Torbutton-safe default, and if they need anything custom, they will most likely just copy their user
agent in to a new profile.

This is more desirable than having default restore it to the non-Tor uagent, because torbutton's spoofing is
better than UAS's, and there's no other easy way to get Torbutton's spoof back without a toggle.

I've implemented this in SVN.

comment:12 Changed 11 years ago by rollanothernumber

OK, that's nice to hear...

Thanks a lot for this!

comment:13 Changed 11 years ago by mikeperry

flyspray2trac: bug closed.
Fixed for 1.2.1

Note: See TracTickets for help on using tickets.