Commit 8cfb90c7 authored by Richard Pospesel's avatar Richard Pospesel Committed by Georg Koppen
Browse files

Bug 26039: FIXUP <profiledir>/preferences/extension-overrides.js will not be loaded in ESR 60

Fixup for 26039.  WebExtension extensions can't read/write prefs, so the
base contents of extension-overrides.js are completely unnecessary.  The
WebExtension versions of noscript and httpseverywhere seem to be nearly
complete re-writes (noscript in particular is much simpler) so our
custom options appear to be no longer required (though a complete audit
of noscript should probably be done just to be sure we don't need to fix
any bad behaviour).

The updated build script for tor-browser now dumps all of the
build-determined prefs (pluggable transport strings, localization
options) into a generated-prefs.js file created at build time, which is
then appended to 000-tor-browser.js as before.

The pdfjs option is no longer needed since the disableRange option seems
to break pdfjs altogether in latest ESR60.  Also, setting the user pref
in 000-tor-browser.js does not work since pdfjs overwrites it with its
own value (any future patch setting pdfjs options needs to modify the
default values table)
parent 71207ea2
# Overrides for Extension Preferences
# Tor Browser Bundle
# Do not edit this file.
# HTTPS Everywhere Preferences:
pref("extensions.https_everywhere._observatory.popup_shown", true);
pref("extensions.https_everywhere.toolbar_hint_shown", true);
# NoScript Preferences:
pref("capability.policy.maonoscript.javascript.enabled", "allAccess");
pref("capability.policy.maonoscript.sites", "[System+Principal] about: about:tbupdate about:tor chrome: resource: blob: mediasource: moz-extension: moz-safe-about: about:neterror about:certerror about:feeds about:tabcrashed about:cache");
pref("noscript.default", "[System+Principal] about: about:tbupdate about:tor chrome: resource: blob: mediasource: moz-extension: moz-safe-about: about:neterror about:certerror about:feeds about:tabcrashed about:cache");
pref("noscript.mandatory", "[System+Principal] about: about:tbupdate about:tor chrome: resource: blob: mediasource: moz-extension: moz-safe-about: about:neterror about:certerror about:feeds about:tabcrashed about:cache");
pref("noscript.ABE.enabled", false);
pref("noscript.ABE.notify", false);
pref("noscript.ABE.wanIpAsLocal", false);
pref("noscript.confirmUnblock", false);
pref("noscript.contentBlocker", true);
pref("noscript.firstRunRedirection", false);
pref("noscript.global", true);
pref("noscript.gtemp", "");
pref("noscript.opacizeObject", 3);
pref("noscript.forbidWebGL", true);
pref("noscript.forbidFonts", false);
pref("noscript.options.tabSelectedIndexes", "5,0,0");
pref("noscript.policynames", "");
pref("noscript.secureCookies", true);
pref("noscript.showAllowPage", false);
pref("noscript.showBaseDomain", false);
pref("noscript.showDistrust", false);
pref("noscript.showRecentlyBlocked", false);
pref("noscript.showTemp", false);
pref("noscript.showTempToPerm", false);
pref("noscript.showUntrusted", false);
pref("noscript.STS.enabled", false);
pref("noscript.subscription.lastCheck", -142148139);
pref("noscript.temp", "");
pref("noscript.untrusted", "");
pref("noscript.forbidMedia", false);
pref("noscript.allowWhitelistUpdates", false);
pref("noscript.fixLinks", false);
// Now handled by plugins.click_to_play
pref("noscript.forbidFlash", false);
pref("noscript.forbidSilverlight", false);
pref("noscript.forbidJava", false);
pref("noscript.forbidPlugins", false);
// Usability tweaks
pref("noscript.showPermanent", false);
pref("noscript.showTempAllowPage", true);
pref("noscript.showRevokeTemp", true);
pref("noscript.notify", false);
pref("noscript.autoReload", true);
pref("noscript.autoReload.allTabs", false);
pref("noscript.cascadePermissions", true);
pref("noscript.restrictSubdocScripting", true);
pref("noscript.showVolatilePrivatePermissionsToggle", false);
pref("noscript.volatilePrivatePermissions", true);
pref("noscript.clearClick", 0);
# PDF.js
// needs to be a user_pref because pdf.js blows away non-user prefs with its own
// defaults each time
user_pref("pdfjs.disableRange", true);
......@@ -12,7 +12,9 @@ mkdir -p $OUTDIR
# directory named tor-browser (instead of tor-browser_en-US). Therefore we
# stage everything under tor-browser-stage to avoid a conflict.
TB_STAGE_DIR=$distdir/tor-browser-stage
EXTOVERRIDESPATH=$rootdir/Bundle-Data/PTConfigs/extension-overrides.js
GENERATEDPREFSPATH=$rootdir/Bundle-Data/PTConfigs/generated-prefs.js
# Create initially empty prefs file where we can dump our conditionally included/genetered prefs
touch "$GENERATEDPREFSPATH"
[% IF c("var/osx") %]
TBDIR="$TB_STAGE_DIR/Tor Browser.app"
......@@ -113,9 +115,9 @@ cat Bundle-Data/PTConfigs/[% bundledata_osname %]/torrc-defaults-appendix >> "$T
[% IF c("var/linux") -%]
[% IF ! c("var/snowflake") %]
grep -v 'default_bridge\.snowflake' Bundle-Data/PTConfigs/bridge_prefs.js \
>> "$EXTOVERRIDESPATH"
>> "$GENERATEDPREFSPATH"
[% ELSE %]
cat Bundle-Data/PTConfigs/bridge_prefs.js >> "$EXTOVERRIDESPATH"
cat Bundle-Data/PTConfigs/bridge_prefs.js >> "$GENERATEDPREFSPATH"
[% END %]
[% END -%]
[% IF c("var/windows") -%]
......@@ -123,13 +125,13 @@ cat Bundle-Data/PTConfigs/[% bundledata_osname %]/torrc-defaults-appendix >> "$T
# We don't have fte available on Windows x86_64 yet
grep -v 'default_bridge\.snowflake' Bundle-Data/PTConfigs/bridge_prefs.js \
[% IF c("var/windows-x86_64") %]| grep -v 'default_bridge\.fte' [% END %] \
>> "$EXTOVERRIDESPATH"
>> "$GENERATEDPREFSPATH"
[% END -%]
[% IF c("var/osx") -%]
# FTE is temporarily removed due to bug 18495.
grep -Ev 'default_bridge\.fte' Bundle-Data/PTConfigs/bridge_prefs.js \
[% IF ! c("var/snowflake") %]| grep -v 'default_bridge\.snowflake' [% END %] \
>> "$EXTOVERRIDESPATH"
>> "$GENERATEDPREFSPATH"
[% END -%]
cat Bundle-Data/PTConfigs/meek-http-helper-user.js >> "$TBDIR/$MEEKPROFILEPATH/user.js"
......@@ -143,7 +145,7 @@ cat Bundle-Data/PTConfigs/meek-http-helper-user.js >> "$TBDIR/$MEEKPROFILEPATH/u
[% END %]
[% IF ! c("var/multi_lingual") %]
echo 'pref("extensions.torlauncher.prompt_for_locale", false);' >> "$EXTOVERRIDESPATH"
echo 'pref("extensions.torlauncher.prompt_for_locale", false);' >> "$GENERATEDPREFSPATH"
[% END %]
[% IF c("var/linux") %]
......@@ -171,7 +173,7 @@ mv chrome/en-US/locale/browser/searchplugins $rootdir
rm -rf chrome/en-US
unzip omni.ja defaults/preferences/000-tor-browser.js || [ $? -lt 3 ]
# Append our built extension-overrides.js to 000-tor-browser.js
cat "$EXTOVERRIDESPATH" >> defaults/preferences/000-tor-browser.js
cat "$GENERATEDPREFSPATH" >> defaults/preferences/000-tor-browser.js
cp defaults/preferences/000-tor-browser.js $rootdir
[% IF c("var/osx") %]
# Embed our default bookmarks within the en-US locale.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment