Commit cf815094 authored by anonym's avatar anonym
Browse files

Merge remote-tracking branch 'origin/bugfix/17142-unsafe-browser-tabs' into testing

Fix-committed: #17142
parents 0cde1812 99485622
......@@ -249,19 +249,19 @@ apply_prefs_hacks() {
cd "${tmp}"
7z x -tzip "${tbb_install}/browser/omni.ja"
# Remove TBB's Tor Launcher settings since we don't enable it in
# our Tor Browser.
sed -i '/extensions\.torlauncher\./d' defaults/preferences/000-tor-browser.js
# Display the Stop/Reload button: our test suite currently depends on it
perl -pi -E \
's/^(pref\("browser\.uiCustomization\.state",.*\\"loop-button\\")/$1,\\"stop-reload-button\\"/' \
defaults/preferences/000-tor-browser.js
# Append our custom prefs
cat /usr/share/tails/tor-browser-prefs.js \
>> defaults/preferences/000-tor-browser.js
touch --date="@${tbb_timestamp}" defaults/preferences/000-tor-browser.js
rm "${tbb_install}/browser/omni.ja"
7z a -mtc=off -tzip "${tbb_install}/browser/omni.ja" *
# our Tor Browser.
sed -i '/extensions\.torlauncher\./d' defaults/preferences/000-tor-browser.js
# Display the Stop/Reload button: our test suite currently depends on it
perl -pi -E \
's/^(pref\("browser\.uiCustomization\.state",.*\\"loop-button\\")/$1,\\"stop-reload-button\\"/' \
defaults/preferences/000-tor-browser.js
# Append our custom prefs
cat /usr/share/tails/tor-browser-prefs.js \
>> defaults/preferences/000-tor-browser.js
touch --date="@${tbb_timestamp}" defaults/preferences/000-tor-browser.js
rm "${tbb_install}/browser/omni.ja"
7z a -mtc=off -tzip "${tbb_install}/browser/omni.ja" *
)
rm -r "${tmp}"
}
......
......@@ -203,8 +203,8 @@ delete_chroot_browser_searchplugins() {
local tmp="$(mktemp -d)"
(
cd "${tmp}"
7z x -tzip "${pack}" "${searchplugins_dir}"
ls -d "${searchplugins_dir}"/*/manifest.json | xargs 7z d -tzip "${pack}"
7z d -tzip "${pack}" "${searchplugins_dir}/*/manifest.json"
mkdir -p "${searchplugins_dir}"
echo '{"default": {"visibleDefaultEngines": []}, "experimental-hidden": {"visibleDefaultEngines": []}}' \
> "${searchplugins_list}"
7z u -tzip "${pack}" "${searchplugins_list}"
......@@ -213,6 +213,17 @@ delete_chroot_browser_searchplugins() {
chmod a+r "${pack}"
}
# Delete the Tor Browser icons. This prevents a Tor Browser icon being
# shown in the tab of a "New Tab" page.
delete_chroot_browser_icons() {
local chroot="${1}"
local ext_dir="${chroot}/${TBB_EXT}"
pack="${chroot}/${TBB_INSTALL}/browser/omni.ja"
7z d -tzip "${pack}" "chrome/browser/content/branding/icon*.png"
chmod a+r "${pack}"
}
configure_chroot_browser () {
local chroot="${1}" ; shift
local browser_user="${1}" ; shift
......@@ -230,6 +241,7 @@ configure_chroot_browser () {
set_chroot_browser_name "${chroot}" "${human_readable_name}" \
"${browser_name}" "${browser_user}" "${best_locale}"
delete_chroot_browser_searchplugins "${chroot}"
delete_chroot_browser_icons "${chroot}"
set_chroot_browser_permissions "${chroot}" "${browser_name}" \
"${browser_user}"
}
......
......@@ -19,3 +19,6 @@ user_pref("extensions.activeThemeID", "{91a24c60-0f27-427c-b9a6-96b71f3984a9}");
// Required to hide the security level button
user_pref("extensions.torbutton.inserted_button", true);
user_pref("extensions.torbutton.inserted_security_level", true);
// Don't enable private browsing mode by default
user_pref("browser.privatebrowsing.autostart", false);
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