[Tails-dev] torbrowser.version vs. torbutton [Was: Tails 0.1…

Borrar esta mensaxe

Responder a esta mensaxe
Autor: intrigeri
Data:  
Para: The Tails public development discussion list
Asunto: [Tails-dev] torbrowser.version vs. torbutton [Was: Tails 0.14 vs. iceweasel 10.0.9esr-1]
Hi,

intrigeri wrote (20 Oct 2012 07:45:15 GMT) :
>> 3. Ship new Iceweasel esr + relevant TorBrowser patches that we build
>>    ourselves and host on some temporary APT repo so Torbutton becomes
>>    good?


Current alpha TBB sets (in their prefs.js) the "torbrowser.version"
userpref to "2.3.22-alpha-1-Linux-x86_64". As far as git grep told me,
it does not do anything else related to that variable.

**But** torbutton changes its behaviour depending on this variable.
It looks like our (hopefully upcoming) iceweasel + torbrowser patches
should pretend it is torbrowser, else it will get, from torbutton,
behaviour targetted at non-patched Firefox.

So, I'm wondering what version number we should set in our own
torbrowser.version. Hence, I've investigated how exactly
torbrowser.version affects torbutton behaviour.

My results follow. I'm no JavaScript programmer, so I really feel like
another pair of eyes should do the research (if possible
independently), and report back (and, why not, compare with my
results -- else I'll do it).

./src/chrome/content/torbutton.js:
- if extensions.torbutton.versioncheck_enabled, does various things
related to version checks, that we don't want to do in the context
of Tails, since we don't want Tails users to be suggested to
install TBB within Tails (won't work), and Tails has its own update
notification system => we should set this variable to false in
Tails' user.js
- function torbutton_toggle_plugins only acts if torbrowser,
and only called with true (disable plugins) if no_tor_plugins is true;
Tails does not set no_tor_plugins itself
=> I guess the default TBB behaviour is sane, and we should not do
anything by ourselves in there. Testing the actual resulting
behaviour regarding plugins would be nice anyway.
- plugins disabled only if !torbrowser, because torbrowser does it through
0005-Block-all-plugins-except-flash.patch
- a few "if not torbrowser, setup poor-man workarounds" that we can probably
safely ignore since we've got the patches

./src/components/crash-observer.js:
- sets proxy settings according to TOR_SOCKS_HOST and TOR_SOCKS_PORT iff.
TOR_SOCKS_PORT or TOR_TRANSPROXY is set (not the case in Tails)

./src/components/tbSessionStore.js:
- blocks SessionStore if torbrowser, looks good.

=> Given torbrowser.version is only tested in boolean context for
getCharPref, I think we can just set any string that is true in this
context, such as (I guess), "Tails".