tor-commits
Threads by month
- ----- 2025 -----
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
November 2020
- 16 participants
- 1820 discussions

[tor-browser/tor-browser-83.0-10.5-1] Bug 11641: change TBB directory structure to be more like Firefox's
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit bec90075c0a29abe836732c2f6b7e4cd45b8415a
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Tue Apr 29 13:08:24 2014 -0400
Bug 11641: change TBB directory structure to be more like Firefox's
Unless the -osint command line flag is used, the browser now defaults
to the equivalent of -no-remote. There is a new -allow-remote flag that
may be used to restore the original (Firefox-like) default behavior.
---
toolkit/xre/nsAppRunner.cpp | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 984357fd8227..7981fc1d69d3 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -1799,8 +1799,10 @@ static void DumpHelp() {
" --migration Start with migration wizard.\n"
" --ProfileManager Start with ProfileManager.\n"
#ifdef MOZ_HAS_REMOTE
- " --no-remote Do not accept or send remote commands; implies\n"
+ " --no-remote (default) Do not accept or send remote commands; "
+ "implies\n"
" --new-instance.\n"
+ " --allow-remote Accept and send remote commands.\n"
" --new-instance Open new instance, not a new window in running "
"instance.\n"
#endif
@@ -3960,16 +3962,25 @@ int XREMain::XRE_mainInit(bool* aExitFlag) {
gSafeMode);
#if defined(MOZ_HAS_REMOTE)
+ // In Tor Browser, remoting is disabled by default unless -osint is used.
+ bool allowRemote = (CheckArg("allow-remote") == ARG_FOUND);
+ bool isOsint = (CheckArg("osint", nullptr, CheckArgFlag::None) == ARG_FOUND);
+ if (!allowRemote && !isOsint) {
+ SaveToEnv("MOZ_NO_REMOTE=1");
+ }
// Handle --no-remote and --new-instance command line arguments. Setup
// the environment to better accommodate other components and various
// restart scenarios.
ar = CheckArg("no-remote");
- if (ar == ARG_FOUND || EnvHasValue("MOZ_NO_REMOTE")) {
+ if ((ar == ARG_FOUND) && allowRemote) {
+ PR_fprintf(PR_STDERR,
+ "Error: argument --no-remote is invalid when argument "
+ "--allow-remote is specified\n");
+ return 1;
+ }
+ if (EnvHasValue("MOZ_NO_REMOTE")) {
mDisableRemoteClient = true;
mDisableRemoteServer = true;
- if (!EnvHasValue("MOZ_NO_REMOTE")) {
- SaveToEnv("MOZ_NO_REMOTE=1");
- }
}
ar = CheckArg("new-instance");
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 18800: Remove localhost DNS lookup in nsProfileLock.cpp
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit 03e1e3532ccec840aef0a5ae43586175e0b7c1a5
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Thu Apr 21 10:40:26 2016 -0400
Bug 18800: Remove localhost DNS lookup in nsProfileLock.cpp
Instead of using the local computer's IP address within
symlink-based profile lock signatures, always use 127.0.0.1.
---
toolkit/profile/nsProfileLock.cpp | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/toolkit/profile/nsProfileLock.cpp b/toolkit/profile/nsProfileLock.cpp
index 01818d32e6f7..adccfa4dd6d4 100644
--- a/toolkit/profile/nsProfileLock.cpp
+++ b/toolkit/profile/nsProfileLock.cpp
@@ -289,18 +289,17 @@ nsresult nsProfileLock::LockWithSymlink(nsIFile* aLockFile,
if (!mReplacedLockTime)
aLockFile->GetLastModifiedTimeOfLink(&mReplacedLockTime);
+ // For Tor Browser, avoid a DNS lookup here so the Tor network is not
+ // bypassed. Instead, always use 127.0.0.1 for the IP address portion
+ // of the lock signature, which may cause the browser to refuse to
+ // start in the rare event that all of the following conditions are met:
+ // 1. The browser profile is on a network file system.
+ // 2. The file system does not support fcntl() locking.
+ // 3. Tor Browser is run from two different computers at the same time.
+
struct in_addr inaddr;
inaddr.s_addr = htonl(INADDR_LOOPBACK);
- char hostname[256];
- PRStatus status = PR_GetSystemInfo(PR_SI_HOSTNAME, hostname, sizeof hostname);
- if (status == PR_SUCCESS) {
- char netdbbuf[PR_NETDB_BUF_SIZE];
- PRHostEnt hostent;
- status = PR_GetHostByName(hostname, netdbbuf, sizeof netdbbuf, &hostent);
- if (status == PR_SUCCESS) memcpy(&inaddr, hostent.h_addr, sizeof inaddr);
- }
-
mozilla::SmprintfPointer signature =
mozilla::Smprintf("%s:%s%lu", inet_ntoa(inaddr),
aHaveFcntlLock ? "+" : "", (unsigned long)getpid());
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 21724: Make Firefox and Tor Browser distinct macOS apps
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit e8e2d18674a349af5be74d9435af2a45c424a8d7
Author: teor <teor2345(a)gmail.com>
Date: Mon Mar 13 23:06:23 2017 +1100
Bug 21724: Make Firefox and Tor Browser distinct macOS apps
When macOS opens a document or selects a default browser, it sometimes
uses the CFBundleSignature. Changing from the Firefox MOZB signature to
a different signature TORB allows macOS to distinguish between Firefox
and Tor Browser.
---
browser/app/Makefile.in | 2 +-
browser/app/macbuild/Contents/Info.plist.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
index d365e63dd745..e55a5cebd5b4 100644
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -102,5 +102,5 @@ ifdef MOZ_UPDATER
mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
endif
- printf APPLMOZB > '$(dist_dest)/Contents/PkgInfo'
+ printf APPLTORB > '$(dist_dest)/Contents/PkgInfo'
endif
diff --git a/browser/app/macbuild/Contents/Info.plist.in b/browser/app/macbuild/Contents/Info.plist.in
index 18a88470296a..f9d01d8277aa 100644
--- a/browser/app/macbuild/Contents/Info.plist.in
+++ b/browser/app/macbuild/Contents/Info.plist.in
@@ -179,7 +179,7 @@
<key>CFBundleShortVersionString</key>
<string>%APP_VERSION%</string>
<key>CFBundleSignature</key>
- <string>MOZB</string>
+ <string>TORB</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 16285: Exclude ClearKey system for now
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit 0edc92661bcf8e691b9550b39713008e340daaa2
Author: Georg Koppen <gk(a)torproject.org>
Date: Mon May 22 12:44:40 2017 +0000
Bug 16285: Exclude ClearKey system for now
In the past the ClearKey system had not been compiled when specifying
--disable-eme. But that changed and it is even bundled nowadays (see:
Mozilla's bug 1300654). We don't want to ship it right now as the use
case for it is not really visible while the code had security
vulnerabilities in the past.
---
browser/installer/package-manifest.in | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 6a2f19cb040a..74589084d4fa 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -469,8 +469,8 @@ bin/libfreebl_64int_3.so
#endif
; media
-@RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
-@RESPATH@/gmp-clearkey/0.1/manifest.json
+;@RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
+;@RESPATH@/gmp-clearkey/0.1/manifest.json
#ifdef MOZ_DMD
; DMD
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 4234: Use the Firefox Update Process for Tor Browser.
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit ea22fbe36297226d3588996ef6c3d3305c1f6c00
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Fri Jan 13 11:40:24 2017 -0500
Bug 4234: Use the Firefox Update Process for Tor Browser.
The following files are never updated:
TorBrowser/Data/Browser/profiles.ini
TorBrowser/Data/Browser/profile.default/bookmarks.html
TorBrowser/Data/Tor/torrc
Mac OS: Store update metadata under TorBrowser/UpdateInfo.
Removed the %OS_VERSION% component from the update URL (13047) and
added support for minSupportedOSVersion, an attribute of the
<update> element that may be used to trigger Firefox's
"unsupported platform" behavior.
Hide the "What's new" links (set app.releaseNotesURL value to about:blank).
Windows: disable "runas" code path in updater (15201).
Windows: avoid writing to the registry (16236).
Also includes fixes for tickets 13047, 13301, 13356, 13594, 15406,
16014, 16909, 24476, and 25909.
Also fix Bug 26049: reduce the delay before the update prompt is displayed.
Instead of Firefox's 2 days, we use 1 hour (after which time the update
doorhanger will be displayed).
Also fix bug 27221: purge the startup cache if the Tor Browser
version changed (even if the Firefox version and build ID did
not change), e.g., after a minor Tor Browser update.
Also fix 32616: Disable GetSecureOutputDirectoryPath() functionality.
Bug 26048: potentially confusing "restart to update" message
Within the update doorhanger, remove the misleading message that mentions
that windows will be restored after an update is applied, and replace the
"Restart and Restore" button label with an existing
"Restart to update Tor Browser" string.
Bug 28885: notify users that update is downloading
Add a "Downloading Tor Browser update" item which appears in the
hamburger (app) menu while the update service is downloading a MAR
file. Before this change, the browser did not indicate to the user
that an update was in progress, which is especially confusing in
Tor Browser because downloads often take some time. If the user
clicks on the new menu item, the about dialog is opened to allow
the user to see download progress.
As part of this fix, the update service was changed to always show
update-related messages in the hamburger menu, even if the update
was started in the foreground via the about dialog or via the
"Check for Tor Browser Update" toolbar menu item. This change is
consistent with the Tor Browser goal of making sure users are
informed about the update process.
Removed #28885 parts of this patch which have been uplifted to Firefox.
---
browser/app/Makefile.in | 2 +
browser/app/profile/000-tor-browser.js | 16 +-
browser/app/profile/firefox.js | 10 +-
browser/base/content/aboutDialog-appUpdater.js | 2 +-
browser/base/content/aboutDialog.js | 12 +-
browser/components/BrowserContentHandler.jsm | 39 ++-
.../customizableui/content/panelUI.inc.xhtml | 5 +-
browser/confvars.sh | 35 +--
browser/installer/package-manifest.in | 2 +
build/application.ini.in | 2 +-
build/moz.configure/init.configure | 3 +-
config/createprecomplete.py | 17 +-
.../client/aboutdebugging/src/actions/runtimes.js | 5 +
toolkit/modules/UpdateUtils.jsm | 34 +--
toolkit/mozapps/extensions/AddonManager.jsm | 24 ++
toolkit/mozapps/extensions/test/browser/head.js | 1 +
.../extensions/test/xpcshell/head_addons.js | 1 +
toolkit/mozapps/update/UpdateService.jsm | 127 +++++++-
toolkit/mozapps/update/UpdateServiceStub.jsm | 4 +
toolkit/mozapps/update/common/updatehelper.cpp | 8 +
toolkit/mozapps/update/moz.build | 5 +-
toolkit/mozapps/update/updater/launchchild_osx.mm | 2 +
toolkit/mozapps/update/updater/moz.build | 2 +-
toolkit/mozapps/update/updater/updater.cpp | 339 ++++++++++++++++++---
toolkit/xre/MacLaunchHelper.h | 2 +
toolkit/xre/MacLaunchHelper.mm | 2 +
toolkit/xre/nsAppRunner.cpp | 22 +-
toolkit/xre/nsUpdateDriver.cpp | 109 ++++++-
toolkit/xre/nsXREDirProvider.cpp | 42 ++-
tools/update-packaging/common.sh | 64 ++--
tools/update-packaging/make_full_update.sh | 25 ++
tools/update-packaging/make_incremental_update.sh | 71 ++++-
32 files changed, 879 insertions(+), 155 deletions(-)
diff --git a/browser/app/Makefile.in b/browser/app/Makefile.in
index e55a5cebd5b4..4fc1e47ed2fa 100644
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -97,10 +97,12 @@ tools repackage:: $(DIST)/bin/$(MOZ_APP_NAME) $(objdir)/macbuild/Contents/MacOS-
rsync -aL $(DIST)/bin/$(MOZ_APP_NAME) '$(dist_dest)/Contents/MacOS'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/firefox.icns '$(dist_dest)/Contents/Resources/firefox.icns'
cp -RL $(topsrcdir)/$(MOZ_BRANDING_DIRECTORY)/document.icns '$(dist_dest)/Contents/Resources/document.icns'
+ifndef TOR_BROWSER_UPDATE
$(MKDIR) -p '$(dist_dest)/Contents/Library/LaunchServices'
ifdef MOZ_UPDATER
mv -f '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater' '$(dist_dest)/Contents/Library/LaunchServices'
ln -s ../../../../Library/LaunchServices/org.mozilla.updater '$(dist_dest)/Contents/MacOS/updater.app/Contents/MacOS/org.mozilla.updater'
+endif
endif
printf APPLTORB > '$(dist_dest)/Contents/PkgInfo'
endif
diff --git a/browser/app/profile/000-tor-browser.js b/browser/app/profile/000-tor-browser.js
index bb8bc18142b7..7afc248e1137 100644
--- a/browser/app/profile/000-tor-browser.js
+++ b/browser/app/profile/000-tor-browser.js
@@ -7,7 +7,6 @@
// Disable initial homepage notifications
pref("browser.search.update", false);
pref("browser.rights.3.shown", true);
-pref("browser.startup.homepage_override.mstone", "ignore");
pref("startup.homepage_welcome_url", "");
pref("startup.homepage_welcome_url.additional", "");
@@ -20,9 +19,17 @@ pref("startup.homepage_override_url", "https://blog.torproject.org/category/tags
// Try to nag a bit more about updates: Pop up a restart dialog an hour after the initial dialog
pref("app.update.promptWaitTime", 3600);
-
-#ifdef XP_WIN
-// For now, disable staged updates on Windows (see #18292).
+pref("app.update.notifyDuringDownload", true);
+pref("app.update.url.manual", "https://www.torproject.org/download/languages/");
+pref("app.update.url.details", "https://www.torproject.org/download/");
+pref("app.update.badgeWaitTime", 0);
+pref("app.releaseNotesURL", "about:blank");
+
+#ifndef XP_MACOSX
+// Disable staged updates on platforms other than macOS.
+// Staged updates do not work on Windows due to #18292.
+// Also, on Windows and Linux any changes that are made to the browser profile
+// or Tor data after an update is staged will be lost.
pref("app.update.staging.enabled", false);
#endif
@@ -82,6 +89,7 @@ pref("datareporting.policy.dataSubmissionEnabled", false);
// Make sure Unified Telemetry is really disabled, see: #18738.
pref("toolkit.telemetry.unified", false);
pref("toolkit.telemetry.enabled", false);
+pref("toolkit.telemetry.updatePing.enabled", false); // Make sure updater telemetry is disabled; see #25909.
#ifdef XP_WIN
// Defense-in-depth: ensure that the Windows default browser agent will
// not ping Mozilla if it is somehow present (we omit it at build time).
diff --git a/browser/app/profile/firefox.js b/browser/app/profile/firefox.js
index 0a66a438adbe..aeccc99e74f1 100644
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -138,14 +138,8 @@ pref("app.update.elevation.promptMaxAttempts", 2);
pref("app.update.notifyDuringDownload", false);
// If set to true, the Update Service will automatically download updates if the
-// user can apply updates. This pref is no longer used on Windows, except as the
-// default value to migrate to the new location that this data is now stored
-// (which is in a file in the update directory). Because of this, this pref
-// should no longer be used directly. Instead, getAppUpdateAutoEnabled and
-// getAppUpdateAutoEnabled from UpdateUtils.jsm should be used.
-#ifndef XP_WIN
- pref("app.update.auto", true);
-#endif
+// user can apply updates.
+pref("app.update.auto", true);
// If set to true, the Update Service will apply updates in the background
// when it finishes downloading them.
diff --git a/browser/base/content/aboutDialog-appUpdater.js b/browser/base/content/aboutDialog-appUpdater.js
index 59992a49f131..de3ed02ed1de 100644
--- a/browser/base/content/aboutDialog-appUpdater.js
+++ b/browser/base/content/aboutDialog-appUpdater.js
@@ -128,7 +128,7 @@ appUpdater.prototype = {
if (aChildID == "downloadAndInstall") {
let updateVersion = gAppUpdater.update.displayVersion;
// Include the build ID if this is an "a#" (nightly or aurora) build
- if (/a\d+$/.test(updateVersion)) {
+ if (!AppConstants.TOR_BROWSER_UPDATE && /a\d+$/.test(updateVersion)) {
let buildID = gAppUpdater.update.buildID;
let year = buildID.slice(0, 4);
let month = buildID.slice(4, 6);
diff --git a/browser/base/content/aboutDialog.js b/browser/base/content/aboutDialog.js
index 19f0d6f16c6c..13dfe0e37ca2 100644
--- a/browser/base/content/aboutDialog.js
+++ b/browser/base/content/aboutDialog.js
@@ -50,15 +50,13 @@ async function init(aEvent) {
bits: Services.appinfo.is64Bit ? 64 : 32,
};
+ // Adjust version text to show the Tor Browser version
+ versionAttributes.version = AppConstants.TOR_BROWSER_VERSION +
+ " (based on Mozilla Firefox " +
+ AppConstants.MOZ_APP_VERSION_DISPLAY + ")";
+
let version = Services.appinfo.version;
if (/a\d+$/.test(version)) {
- versionId = "aboutDialog-version-nightly";
- let buildID = Services.appinfo.appBuildID;
- let year = buildID.slice(0, 4);
- let month = buildID.slice(4, 6);
- let day = buildID.slice(6, 8);
- versionAttributes.isodate = `${year}-${month}-${day}`;
-
document.getElementById("experimental").hidden = false;
document.getElementById("communityDesc").hidden = true;
}
diff --git a/browser/components/BrowserContentHandler.jsm b/browser/components/BrowserContentHandler.jsm
index 706962c9f6a1..9b74c1e7e404 100644
--- a/browser/components/BrowserContentHandler.jsm
+++ b/browser/components/BrowserContentHandler.jsm
@@ -46,6 +46,8 @@ XPCOMUtils.defineLazyGlobalGetters(this, [URL]);
const NEWINSTALL_PAGE = "about:newinstall";
+const kTBSavedVersionPref = "browser.startup.homepage_override.torbrowser.version";
+
// One-time startup homepage override configurations
const ONCE_DOMAINS = ["mozilla.org", "firefox.com"];
const ONCE_PREF = "browser.startup.homepage_override.once";
@@ -105,7 +107,8 @@ const OVERRIDE_ALTERNATE_PROFILE = 4;
* Returns:
* OVERRIDE_NEW_PROFILE if this is the first run with a new profile.
* OVERRIDE_NEW_MSTONE if this is the first run with a build with a different
- * Gecko milestone (i.e. right after an upgrade).
+ * Gecko milestone or Tor Browser version (i.e. right
+ * after an upgrade).
* OVERRIDE_NEW_BUILD_ID if this is the first run with a new build ID of the
* same Gecko milestone (i.e. after a nightly upgrade).
* OVERRIDE_NONE otherwise.
@@ -128,6 +131,11 @@ function needHomepageOverride(prefb) {
var mstone = Services.appinfo.platformVersion;
+ var savedTBVersion = null;
+ try {
+ savedTBVersion = prefb.getCharPref(kTBSavedVersionPref);
+ } catch (e) {}
+
var savedBuildID = prefb.getCharPref(
"browser.startup.homepage_override.buildID",
""
@@ -146,7 +154,22 @@ function needHomepageOverride(prefb) {
prefb.setCharPref("browser.startup.homepage_override.mstone", mstone);
prefb.setCharPref("browser.startup.homepage_override.buildID", buildID);
- return savedmstone ? OVERRIDE_NEW_MSTONE : OVERRIDE_NEW_PROFILE;
+ prefb.setCharPref(kTBSavedVersionPref, AppConstants.TOR_BROWSER_VERSION);
+
+ // After an upgrade from an older release of Tor Browser (<= 5.5a1), the
+ // savedmstone will be undefined because those releases included the
+ // value "ignore" for the browser.startup.homepage_override.mstone pref.
+ // To correctly detect an upgrade vs. a new profile, we check for the
+ // presence of the "app.update.postupdate" pref.
+ let updated = prefb.prefHasUserValue("app.update.postupdate");
+ return (savedmstone || updated) ? OVERRIDE_NEW_MSTONE
+ : OVERRIDE_NEW_PROFILE;
+ }
+
+ if (AppConstants.TOR_BROWSER_VERSION != savedTBVersion) {
+ prefb.setCharPref("browser.startup.homepage_override.buildID", buildID);
+ prefb.setCharPref(kTBSavedVersionPref, AppConstants.TOR_BROWSER_VERSION);
+ return OVERRIDE_NEW_MSTONE;
}
if (buildID != savedBuildID) {
@@ -645,6 +668,13 @@ nsBrowserContentHandler.prototype = {
"browser.startup.homepage_override.buildID",
"unknown"
);
+
+ // We do the same for the Tor Browser version.
+ let old_tbversion = null;
+ try {
+ old_tbversion = prefb.getCharPref(kTBSavedVersionPref);
+ } catch (e) {}
+
override = needHomepageOverride(prefb);
if (override != OVERRIDE_NONE) {
switch (override) {
@@ -677,9 +707,10 @@ nsBrowserContentHandler.prototype = {
"startup.homepage_override_url"
);
let update = UpdateManager.readyUpdate;
+ let old_version = old_tbversion ? old_tbversion: old_mstone;
if (
update &&
- Services.vc.compare(update.appVersion, old_mstone) > 0
+ Services.vc.compare(update.appVersion, old_version) > 0
) {
overridePage = getPostUpdateOverridePage(update, overridePage);
// Send the update ping to signal that the update was successful.
@@ -687,6 +718,8 @@ nsBrowserContentHandler.prototype = {
}
overridePage = overridePage.replace("%OLD_VERSION%", old_mstone);
+ overridePage = overridePage.replace("%OLD_TOR_BROWSER_VERSION%",
+ old_tbversion);
break;
case OVERRIDE_NEW_BUILD_ID:
if (UpdateManager.readyUpdate) {
diff --git a/browser/components/customizableui/content/panelUI.inc.xhtml b/browser/components/customizableui/content/panelUI.inc.xhtml
index fc467b1234d4..6d89435b4049 100644
--- a/browser/components/customizableui/content/panelUI.inc.xhtml
+++ b/browser/components/customizableui/content/panelUI.inc.xhtml
@@ -143,14 +143,15 @@
<popupnotification id="appMenu-update-restart-notification"
popupid="update-restart"
data-lazy-l10n-id="appmenu-update-restart"
- data-l10n-attrs="buttonlabel, buttonaccesskey, secondarybuttonlabel, secondarybuttonaccesskey"
+ data-l10n-attrs="buttonaccesskey, secondarybuttonlabel, secondarybuttonaccesskey"
+ buttonlabel="&updateRestart.panelUI.label2;"
closebuttonhidden="true"
dropmarkerhidden="true"
checkboxhidden="true"
buttonhighlight="true"
hidden="true">
<popupnotificationcontent id="update-restart-notification-content" orient="vertical">
- <description id="update-restart-description" data-lazy-l10n-id="appmenu-update-restart-message"></description>
+ <description id="update-restart-description"> </description>
</popupnotificationcontent>
</popupnotification>
diff --git a/browser/confvars.sh b/browser/confvars.sh
index 92871c9516f9..040a27e9b92d 100755
--- a/browser/confvars.sh
+++ b/browser/confvars.sh
@@ -6,26 +6,6 @@
MOZ_APP_VENDOR=Mozilla
MOZ_UPDATER=1
-if test "$OS_ARCH" = "WINNT"; then
- if ! test "$HAVE_64BIT_BUILD"; then
- if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
- "$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \
- "$MOZ_UPDATE_CHANNEL" = "aurora" -o \
- "$MOZ_UPDATE_CHANNEL" = "beta" -o \
- "$MOZ_UPDATE_CHANNEL" = "release"; then
- if ! test "$MOZ_DEBUG"; then
- if ! test "$USE_STUB_INSTALLER"; then
- # Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
- echo "ERROR: STUB installer expected to be enabled but"
- echo "ERROR: USE_STUB_INSTALLER is not specified in the environment"
- exit 1
- fi
- MOZ_STUB_INSTALLER=1
- fi
- fi
- fi
-fi
-
BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
@@ -38,6 +18,21 @@ MOZ_BRANDING_DIRECTORY=browser/branding/unofficial
MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/official
MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
+# ACCEPTED_MAR_CHANNEL_IDS should usually be the same as the value MAR_CHANNEL_ID.
+# If more than one ID is needed, then you should use a comma separated list
+# of values.
+# The MAR_CHANNEL_ID must not contain the following 3 characters: ",\t "
+if test "$MOZ_UPDATE_CHANNEL" = "alpha"; then
+ ACCEPTED_MAR_CHANNEL_IDS=torbrowser-torproject-alpha
+ MAR_CHANNEL_ID=torbrowser-torproject-alpha
+elif test "$MOZ_UPDATE_CHANNEL" = "nightly"; then
+ ACCEPTED_MAR_CHANNEL_IDS=torbrowser-torproject-nightly
+ MAR_CHANNEL_ID=torbrowser-torproject-nightly
+else
+ ACCEPTED_MAR_CHANNEL_IDS=torbrowser-torproject-release
+ MAR_CHANNEL_ID=torbrowser-torproject-release
+fi
+
MOZ_PROFILE_MIGRATOR=1
# Include the DevTools client, not just the server (which is the default)
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index d2113da95cdf..6a2f19cb040a 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -36,8 +36,10 @@
; Mac bundle stuff
@APPNAME@/Contents/Info.plist
#ifdef MOZ_UPDATER
+#ifndef TOR_BROWSER_UPDATE
@APPNAME@/Contents/Library/LaunchServices
#endif
+#endif
@APPNAME@/Contents/PkgInfo
@RESPATH@/firefox.icns
@RESPATH@/document.icns
diff --git a/build/application.ini.in b/build/application.ini.in
index a6141de0be15..96faf3775588 100644
--- a/build/application.ini.in
+++ b/build/application.ini.in
@@ -52,5 +52,5 @@ ServerURL=https://crash-reports.mozilla.com/submit?id=@MOZ_APP_ID@&version=…
#if MOZ_UPDATER
[AppUpdate]
-URL=https://@MOZ_APPUPDATE_HOST@/update/6/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/update.xml
+URL=https://aus1.torproject.org/torbrowser/update_3/%CHANNEL%/%BUILD_TARGET%/%VERSION%/%LOCALE%
#endif
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index e9c9d2f0d5c3..90a706c78f75 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -1140,7 +1140,6 @@ def version_path(path):
# set RELEASE_OR_BETA and NIGHTLY_BUILD variables depending on the cycle we're in
# The logic works like this:
# - if we have "a1" in GRE_MILESTONE, we're building Nightly (define NIGHTLY_BUILD)
-# - otherwise, if we have "a" in GRE_MILESTONE, we're building Nightly or Aurora
# - otherwise, we're building Release/Beta (define RELEASE_OR_BETA)
@depends(check_build_environment, build_project, version_path, '--help')
@imports(_from='__builtin__', _import='open')
@@ -1187,7 +1186,7 @@ def milestone(build_env, build_project, version_path, _):
if 'a1' in milestone:
is_nightly = True
- elif 'a' not in milestone:
+ else:
is_release_or_beta = True
major_version = milestone.split('.')[0]
diff --git a/config/createprecomplete.py b/config/createprecomplete.py
index fadd796aa21f..73793c8e8b19 100644
--- a/config/createprecomplete.py
+++ b/config/createprecomplete.py
@@ -5,6 +5,7 @@
# update instructions which is used to remove files and directories that are no
# longer present in a complete update. The current working directory is used for
# the location to enumerate and to create the precomplete file.
+# For symlinks, remove instructions are always generated.
from __future__ import absolute_import
from __future__ import unicode_literals
@@ -13,9 +14,17 @@ import os
import io
+# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
+# we should remove all lines in this file that contain:
+# TorBrowser/Data
+
def get_build_entries(root_path):
""" Iterates through the root_path, creating a list for each file and
directory. Excludes any file paths ending with channel-prefs.js.
+ To support Tor Browser updates, excludes:
+ TorBrowser/Data/Browser/profiles.ini
+ TorBrowser/Data/Browser/profile.default/bookmarks.html
+ TorBrowser/Data/Tor/torrc
"""
rel_file_path_set = set()
rel_dir_path_set = set()
@@ -26,6 +35,9 @@ def get_build_entries(root_path):
rel_path_file = rel_path_file.replace("\\", "/")
if not (rel_path_file.endswith("channel-prefs.js") or
rel_path_file.endswith("update-settings.ini") or
+ rel_path_file == "TorBrowser/Data/Browser/profiles.ini" or
+ rel_path_file == "TorBrowser/Data/Browser/profile.default/bookmarks.html" or
+ rel_path_file == "TorBrowser/Data/Tor/torrc" or
rel_path_file.find("distribution/") != -1):
rel_file_path_set.add(rel_path_file)
@@ -34,7 +46,10 @@ def get_build_entries(root_path):
rel_path_dir = os.path.join(parent_dir_rel_path, dir_name)
rel_path_dir = rel_path_dir.replace("\\", "/")+"/"
if rel_path_dir.find("distribution/") == -1:
- rel_dir_path_set.add(rel_path_dir)
+ if (os.path.islink(rel_path_dir[:-1])):
+ rel_file_path_set.add(rel_path_dir[:-1])
+ else:
+ rel_dir_path_set.add(rel_path_dir)
rel_file_path_list = list(rel_file_path_set)
rel_file_path_list.sort(reverse=True)
diff --git a/devtools/client/aboutdebugging/src/actions/runtimes.js b/devtools/client/aboutdebugging/src/actions/runtimes.js
index 3d9ce0490bf2..00dff36f28a2 100644
--- a/devtools/client/aboutdebugging/src/actions/runtimes.js
+++ b/devtools/client/aboutdebugging/src/actions/runtimes.js
@@ -71,6 +71,11 @@ async function getRuntimeIcon(runtime, channel) {
}
}
+ // Use the release build skin for devtools within Tor Browser alpha releases.
+ if (channel === "alpha") {
+ return "chrome://devtools/skin/images/aboutdebugging-firefox-release.svg";
+ }
+
return channel === "release" || channel === "beta" || channel === "aurora"
? `chrome://devtools/skin/images/aboutdebugging-firefox-${channel}.svg`
: "chrome://devtools/skin/images/aboutdebugging-firefox-nightly.svg";
diff --git a/toolkit/modules/UpdateUtils.jsm b/toolkit/modules/UpdateUtils.jsm
index d2b695b47442..883928472732 100644
--- a/toolkit/modules/UpdateUtils.jsm
+++ b/toolkit/modules/UpdateUtils.jsm
@@ -103,7 +103,7 @@ var UpdateUtils = {
case "PRODUCT":
return Services.appinfo.name;
case "VERSION":
- return Services.appinfo.version;
+ return AppConstants.TOR_BROWSER_VERSION;
case "BUILD_ID":
return Services.appinfo.appBuildID;
case "BUILD_TARGET":
@@ -167,25 +167,17 @@ var UpdateUtils = {
* downloads and installs updates. This corresponds to whether or not the user
* has selected "Automatically install updates" in about:preferences.
*
- * On Windows, this setting is shared across all profiles for the installation
+ * On Windows (except in Tor Browser), this setting is shared across all profiles
+ * for the installation
* and is read asynchronously from the file. On other operating systems, this
* setting is stored in a pref and is thus a per-profile setting.
*
* @return A Promise that resolves with a boolean.
*/
getAppUpdateAutoEnabled() {
- if (Services.policies) {
- if (!Services.policies.isAllowed("app-auto-updates-off")) {
- // We aren't allowed to turn off auto-update - it is forced on.
- return Promise.resolve(true);
- }
- if (!Services.policies.isAllowed("app-auto-updates-on")) {
- // We aren't allowed to turn on auto-update - it is forced off.
- return Promise.resolve(false);
- }
- }
- if (AppConstants.platform != "win") {
- // On platforms other than Windows the setting is stored in a preference.
+ if (AppConstants.TOR_BROWSER_UPDATE || (AppConstants.platform != "win")) {
+ // On platforms other than Windows and always in Tor Browser the setting
+ // is stored in a preference.
let prefValue = Services.prefs.getBoolPref(
PREF_APP_UPDATE_AUTO,
DEFAULT_APP_UPDATE_AUTO
@@ -256,7 +248,8 @@ var UpdateUtils = {
* updates" and "Check for updates but let you choose to install them" options
* in about:preferences.
*
- * On Windows, this setting is shared across all profiles for the installation
+ * On Windows (except in Tor Browser), this setting is shared across all profiles
+ * for the installation
* and is written asynchronously to the file. On other operating systems, this
* setting is stored in a pref and is thus a per-profile setting.
*
@@ -276,14 +269,9 @@ var UpdateUtils = {
* this operation simply sets a pref.
*/
setAppUpdateAutoEnabled(enabledValue) {
- if (this.appUpdateAutoSettingIsLocked()) {
- return Promise.reject(
- "setAppUpdateAutoEnabled: Unable to change value of setting because " +
- "it is locked by policy"
- );
- }
- if (AppConstants.platform != "win") {
- // Only in Windows do we store the update config in the update directory
+ if (AppConstants.TOR_BROWSER_UPDATE || (AppConstants.platform != "win")) {
+ // Only in Windows (but never for Tor Browser) do we store the update config
+ // in the update directory
let prefValue = !!enabledValue;
Services.prefs.setBoolPref(PREF_APP_UPDATE_AUTO, prefValue);
// Rather than call maybeUpdateAutoConfigChanged, a pref observer has
diff --git a/toolkit/mozapps/extensions/AddonManager.jsm b/toolkit/mozapps/extensions/AddonManager.jsm
index 726819a25493..b7c046e93eff 100644
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -23,6 +23,7 @@ const { AppConstants } = ChromeUtils.import(
const MOZ_COMPATIBILITY_NIGHTLY = ![
"aurora",
+ "alpha",
"beta",
"release",
"esr",
@@ -37,6 +38,7 @@ const PREF_EM_AUTOUPDATE_DEFAULT = "extensions.update.autoUpdateDefault";
const PREF_EM_STRICT_COMPATIBILITY = "extensions.strictCompatibility";
const PREF_EM_CHECK_UPDATE_SECURITY = "extensions.checkUpdateSecurity";
const PREF_SYS_ADDON_UPDATE_ENABLED = "extensions.systemAddon.update.enabled";
+const PREF_EM_LAST_TORBROWSER_VERSION = "extensions.lastTorBrowserVersion";
const PREF_MIN_WEBEXT_PLATFORM_VERSION =
"extensions.webExtensionsMinPlatformVersion";
@@ -700,6 +702,28 @@ var AddonManagerInternal = {
);
}
+ // To ensure that extension and plugin code gets a chance to run
+ // after each browser update, set appChanged = true when the
+ // Tor Browser version has changed even if the Mozilla app
+ // version has not changed.
+ let tbChanged = undefined;
+ try {
+ tbChanged = AppConstants.TOR_BROWSER_VERSION !=
+ Services.prefs.getCharPref(PREF_EM_LAST_TORBROWSER_VERSION);
+ }
+ catch (e) { }
+ if (tbChanged !== false) {
+ // Because PREF_EM_LAST_TORBROWSER_VERSION was not present in older
+ // versions of Tor Browser, an app change is indicated when tbChanged
+ // is undefined or true.
+ if (appChanged === false) {
+ appChanged = true;
+ }
+
+ Services.prefs.setCharPref(PREF_EM_LAST_TORBROWSER_VERSION,
+ AppConstants.TOR_BROWSER_VERSION);
+ }
+
if (!MOZ_COMPATIBILITY_NIGHTLY) {
PREF_EM_CHECK_COMPATIBILITY =
PREF_EM_CHECK_COMPATIBILITY_BASE +
diff --git a/toolkit/mozapps/extensions/test/browser/head.js b/toolkit/mozapps/extensions/test/browser/head.js
index 4ec7e34fdfb3..6e1e2106d4c8 100644
--- a/toolkit/mozapps/extensions/test/browser/head.js
+++ b/toolkit/mozapps/extensions/test/browser/head.js
@@ -43,6 +43,7 @@ var PREF_CHECK_COMPATIBILITY;
var channel = Services.prefs.getCharPref("app.update.channel", "default");
if (
channel != "aurora" &&
+ channel != "alpha" &&
channel != "beta" &&
channel != "release" &&
channel != "esr"
diff --git a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
index 514330dc508c..bda78374432e 100644
--- a/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
+++ b/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
@@ -390,6 +390,7 @@ function isNightlyChannel() {
return (
channel != "aurora" &&
+ channel != "alpha" &&
channel != "beta" &&
channel != "release" &&
channel != "esr"
diff --git a/toolkit/mozapps/update/UpdateService.jsm b/toolkit/mozapps/update/UpdateService.jsm
index aa8ae5746f97..2eb0038c9a1a 100644
--- a/toolkit/mozapps/update/UpdateService.jsm
+++ b/toolkit/mozapps/update/UpdateService.jsm
@@ -33,12 +33,16 @@ XPCOMUtils.defineLazyModuleGetters(this, {
AddonManager: "resource://gre/modules/AddonManager.jsm",
AsyncShutdown: "resource://gre/modules/AsyncShutdown.jsm",
CertUtils: "resource://gre/modules/CertUtils.jsm",
+#ifdef XP_WIN
ctypes: "resource://gre/modules/ctypes.jsm",
+#endif
DeferredTask: "resource://gre/modules/DeferredTask.jsm",
OS: "resource://gre/modules/osfile.jsm",
setTimeout: "resource://gre/modules/Timer.jsm",
UpdateUtils: "resource://gre/modules/UpdateUtils.jsm",
+#if !defined(TOR_BROWSER_UPDATE)
WindowsRegistry: "resource://gre/modules/WindowsRegistry.jsm",
+#endif
});
const UPDATESERVICE_CID = Components.ID(
@@ -336,6 +340,7 @@ function testWriteAccess(updateTestFile, createDirectory) {
updateTestFile.remove(false);
}
+#ifdef XP_WIN
/**
* Windows only function that closes a Win32 handle.
*
@@ -428,6 +433,7 @@ function getPerInstallationMutexName(aGlobal = true) {
(aGlobal ? "Global\\" : "") + "MozillaUpdateMutex-" + hasher.finish(true)
);
}
+#endif
/**
* Whether or not the current instance has the update mutex. The update mutex
@@ -438,6 +444,7 @@ function getPerInstallationMutexName(aGlobal = true) {
* @return true if this instance holds the update mutex
*/
function hasUpdateMutex() {
+#ifdef XP_WIN
if (AppConstants.platform != "win") {
return true;
}
@@ -445,6 +452,9 @@ function hasUpdateMutex() {
gUpdateMutexHandle = createMutex(getPerInstallationMutexName(true), false);
}
return !!gUpdateMutexHandle;
+#else
+ return true;
+#endif
}
/**
@@ -475,6 +485,11 @@ function areDirectoryEntriesWriteable(aDir) {
* @return true if elevation is required, false otherwise
*/
function getElevationRequired() {
+#if defined(TOR_BROWSER_UPDATE)
+ // To avoid potential security holes associated with running the updater
+ // process with elevated privileges, Tor Browser does not support elevation.
+ return false;
+#else
if (AppConstants.platform != "macosx") {
return false;
}
@@ -509,6 +524,7 @@ function getElevationRequired() {
"not required"
);
return false;
+#endif
}
/**
@@ -558,6 +574,7 @@ function getCanApplyUpdates() {
return false;
}
+#if !defined(TOR_BROWSER_UPDATE)
if (AppConstants.platform == "macosx") {
LOG(
"getCanApplyUpdates - bypass the write since elevation can be used " +
@@ -573,6 +590,7 @@ function getCanApplyUpdates() {
);
return true;
}
+#endif
try {
if (AppConstants.platform == "win") {
@@ -1281,6 +1299,9 @@ function handleUpdateFailure(update, errorCode) {
cancelations++;
Services.prefs.setIntPref(PREF_APP_UPDATE_CANCELATIONS, cancelations);
if (AppConstants.platform == "macosx") {
+#if defined(TOR_BROWSER_UPDATE)
+ cleanupActiveUpdate();
+#else
let osxCancelations = Services.prefs.getIntPref(
PREF_APP_UPDATE_CANCELATIONS_OSX,
0
@@ -1304,6 +1325,7 @@ function handleUpdateFailure(update, errorCode) {
(update.state = STATE_PENDING_ELEVATE)
);
}
+#endif
update.statusText = gUpdateBundle.GetStringFromName("elevationFailure");
} else {
writeStatusFile(getUpdatesDir(), (update.state = STATE_PENDING));
@@ -1830,7 +1852,26 @@ function Update(update) {
this._patches.push(patch);
}
- if (!this._patches.length && !update.hasAttribute("unsupported")) {
+ if (update.hasAttribute("unsupported")) {
+ this.unsupported = ("true" == update.getAttribute("unsupported"));
+ } else if (update.hasAttribute("minSupportedOSVersion")) {
+ let minOSVersion = update.getAttribute("minSupportedOSVersion");
+ try {
+ let osVersion = Services.sysinfo.getProperty("version");
+ this.unsupported = (Services.vc.compare(osVersion, minOSVersion) < 0);
+ } catch (e) {}
+ }
+ if (!this.unsupported && update.hasAttribute("minSupportedInstructionSet")) {
+ let minInstructionSet = update.getAttribute("minSupportedInstructionSet");
+ if (['MMX', 'SSE', 'SSE2', 'SSE3',
+ 'SSE4A', 'SSE4_1', 'SSE4_2'].indexOf(minInstructionSet) >= 0) {
+ try {
+ this.unsupported = !Services.sysinfo.getProperty("has" + minInstructionSet);
+ } catch (e) {}
+ }
+ }
+
+ if (!this._patches.length && !this.unsupported) {
throw Components.Exception("", Cr.NS_ERROR_ILLEGAL_VALUE);
}
@@ -1868,9 +1909,7 @@ function Update(update) {
if (!isNaN(attr.value)) {
this.promptWaitTime = parseInt(attr.value);
}
- } else if (attr.name == "unsupported") {
- this.unsupported = attr.value == "true";
- } else {
+ } else if (attr.name != "unsupported") {
switch (attr.name) {
case "appVersion":
case "buildID":
@@ -1895,7 +1934,11 @@ function Update(update) {
}
if (!this.previousAppVersion) {
+#ifdef TOR_BROWSER_UPDATE
+ this.previousAppVersion = AppConstants.TOR_BROWSER_VERSION;
+#else
this.previousAppVersion = Services.appinfo.version;
+#endif
}
if (!this.elevationFailure) {
@@ -2278,6 +2321,7 @@ UpdateService.prototype = {
Services.obs.removeObserver(this, topic);
Services.prefs.removeObserver(PREF_APP_UPDATE_LOG, this);
+#ifdef XP_WIN
if (AppConstants.platform == "win" && gUpdateMutexHandle) {
// If we hold the update mutex, let it go!
// The OS would clean this up sometime after shutdown,
@@ -2285,6 +2329,7 @@ UpdateService.prototype = {
closeHandle(gUpdateMutexHandle);
gUpdateMutexHandle = null;
}
+#endif
if (this._retryTimer) {
this._retryTimer.cancel();
}
@@ -2318,6 +2363,7 @@ UpdateService.prototype = {
}
break;
case "test-close-handle-update-mutex":
+#ifdef XP_WIN
if (Cu.isInAutomation) {
if (AppConstants.platform == "win" && gUpdateMutexHandle) {
LOG("UpdateService:observe - closing mutex handle for testing");
@@ -2325,6 +2371,7 @@ UpdateService.prototype = {
gUpdateMutexHandle = null;
}
}
+#endif
break;
}
},
@@ -2346,6 +2393,9 @@ UpdateService.prototype = {
*/
_postUpdateProcessing: function AUS__postUpdateProcessing() {
gUpdateFileWriteInfo = { phase: "startup", failure: false };
+#if defined(TOR_BROWSER_UPDATE) && !defined(XP_MACOSX)
+ this._removeOrphanedTorBrowserFiles();
+#endif
if (!this.canCheckForUpdates) {
LOG(
"UpdateService:_postUpdateProcessing - unable to check for " +
@@ -2591,6 +2641,42 @@ UpdateService.prototype = {
}
},
+#if defined(TOR_BROWSER_UPDATE) && !defined(XP_MACOSX)
+ /**
+ * When updating from an earlier version to Tor Browser 6.0 or later, old
+ * update info files are left behind on Linux and Windows. Remove them.
+ */
+ _removeOrphanedTorBrowserFiles: function AUS__removeOrphanedTorBrowserFiles() {
+ try {
+ let oldUpdateInfoDir = getAppBaseDir(); // aka the Browser directory.
+
+#ifdef XP_WIN
+ // On Windows, the updater files were stored under
+ // Browser/TorBrowser/Data/Browser/Caches/firefox/
+ oldUpdateInfoDir.appendRelativePath(
+ "TorBrowser\\Data\\Browser\\Caches\\firefox");
+#endif
+
+ // Remove the updates directory.
+ let updatesDir = oldUpdateInfoDir.clone();
+ updatesDir.append("updates");
+ if (updatesDir.exists() && updatesDir.isDirectory()) {
+ updatesDir.remove(true);
+ }
+
+ // Remove files: active-update.xml and updates.xml
+ let filesToRemove = [ "active-update.xml", "updates.xml" ];
+ filesToRemove.forEach(function(aFileName) {
+ let f = oldUpdateInfoDir.clone();
+ f.append(aFileName);
+ if (f.exists()) {
+ f.remove(false);
+ }
+ });
+ } catch (e) {}
+ },
+#endif
+
/**
* Register an observer when the network comes online, so we can short-circuit
* the app.update.interval when there isn't connectivity
@@ -2948,9 +3034,14 @@ UpdateService.prototype = {
updates.forEach(function(aUpdate) {
// Ignore updates for older versions of the application and updates for
// the same version of the application with the same build ID.
- if (
- vc.compare(aUpdate.appVersion, Services.appinfo.version) < 0 ||
- (vc.compare(aUpdate.appVersion, Services.appinfo.version) == 0 &&
+#ifdef TOR_BROWSER_UPDATE
+ let compatVersion = AppConstants.TOR_BROWSER_VERSION;
+#else
+ let compatVersion = Services.appinfo.version;
+#endif
+ let rc = vc.compare(aUpdate.appVersion, compatVersion);
+ if (rc < 0 ||
+ (rc == 0 &&
aUpdate.buildID == Services.appinfo.appBuildID)
) {
LOG(
@@ -3346,20 +3437,32 @@ UpdateService.prototype = {
// current application's version or the update's version is the same as the
// application's version and the build ID is the same as the application's
// build ID.
+#ifdef TOR_BROWSER_UPDATE
+ let compatVersion = AppConstants.TOR_BROWSER_VERSION;
+#else
+ let compatVersion = Services.appinfo.version;
+#endif
if (
update.appVersion &&
- (Services.vc.compare(update.appVersion, Services.appinfo.version) < 0 ||
+ (Services.vc.compare(update.appVersion, compatVersion) < 0 ||
(update.buildID &&
update.buildID == Services.appinfo.appBuildID &&
- update.appVersion == Services.appinfo.version))
+ update.appVersion == compatVersion))
) {
LOG(
"UpdateService:downloadUpdate - canceling download of update since " +
"it is for an earlier or same application version and build ID.\n" +
+#ifdef TOR_BROWSER_UPDATE
+ "current Tor Browser version: " +
+ compatVersion +
+ "\n" +
+ "update Tor Browser version : " +
+#else
"current application version: " +
- Services.appinfo.version +
+ compatVersion +
"\n" +
"update application version : " +
+#endif
update.appVersion +
"\n" +
"current build ID: " +
@@ -3992,6 +4095,7 @@ Checker.prototype = {
*/
_callback: null,
+#if !defined(TOR_BROWSER_UPDATE)
_getCanMigrate: function UC__getCanMigrate() {
if (AppConstants.platform != "win") {
return false;
@@ -4061,6 +4165,7 @@ Checker.prototype = {
LOG("Checker:_getCanMigrate - no registry entries for this installation");
return false;
},
+#endif // !defined(TOR_BROWSER_UPDATE)
/**
* The URL of the update service XML file to connect to that contains details
@@ -4089,9 +4194,11 @@ Checker.prototype = {
url += (url.includes("?") ? "&" : "?") + "force=1";
}
+#if !defined(TOR_BROWSER_UPDATE)
if (this._getCanMigrate()) {
url += (url.includes("?") ? "&" : "?") + "mig64=1";
}
+#endif
LOG("Checker:getUpdateURL - update URL: " + url);
return url;
diff --git a/toolkit/mozapps/update/UpdateServiceStub.jsm b/toolkit/mozapps/update/UpdateServiceStub.jsm
index 3535131daa28..3ecfd97c8778 100644
--- a/toolkit/mozapps/update/UpdateServiceStub.jsm
+++ b/toolkit/mozapps/update/UpdateServiceStub.jsm
@@ -78,8 +78,12 @@ function UpdateServiceStub() {
// contains the status file's path
// We may need to migrate update data
+ // In Tor Browser we skip this because we do not use an update agent and we
+ // do not want to store any data outside of the browser installation directory.
+ // For more info, see https://bugzilla.mozilla.org/show_bug.cgi?id=1458314
if (
AppConstants.platform == "win" &&
+ !AppConstants.TOR_BROWSER_UPDATE &&
!Services.prefs.getBoolPref(prefUpdateDirMigrated, false)
) {
migrateUpdateDirectory();
diff --git a/toolkit/mozapps/update/common/updatehelper.cpp b/toolkit/mozapps/update/common/updatehelper.cpp
index b094d9eb75e9..c825d3c1ea8e 100644
--- a/toolkit/mozapps/update/common/updatehelper.cpp
+++ b/toolkit/mozapps/update/common/updatehelper.cpp
@@ -66,6 +66,13 @@ BOOL PathGetSiblingFilePath(LPWSTR destinationBuffer, LPCWSTR siblingFilePath,
* @return TRUE if successful
*/
BOOL GetSecureOutputDirectoryPath(LPWSTR outBuf) {
+#ifdef TOR_BROWSER_UPDATE
+ // This function is used to support the maintenance service and elevated
+ // updates and is therefore not called by Tor Browser's updater. We stub
+ // it out to avoid any chance that the Tor Browser updater will create
+ // files under C:\Program Files (x86)\ or a similar location.
+ return FALSE;
+#else
PWSTR progFilesX86;
if (FAILED(SHGetKnownFolderPath(FOLDERID_ProgramFilesX86, KF_FLAG_CREATE,
nullptr, &progFilesX86))) {
@@ -99,6 +106,7 @@ BOOL GetSecureOutputDirectoryPath(LPWSTR outBuf) {
}
return TRUE;
+#endif
}
/**
diff --git a/toolkit/mozapps/update/moz.build b/toolkit/mozapps/update/moz.build
index ddfda4571c31..d0c93895c1ec 100644
--- a/toolkit/mozapps/update/moz.build
+++ b/toolkit/mozapps/update/moz.build
@@ -22,11 +22,14 @@ EXTRA_COMPONENTS += [
EXTRA_JS_MODULES += [
'UpdateListener.jsm',
- 'UpdateService.jsm',
'UpdateServiceStub.jsm',
'UpdateTelemetry.jsm',
]
+EXTRA_PP_JS_MODULES += [
+ 'UpdateService.jsm',
+]
+
XPCOM_MANIFESTS += [
'components.conf',
]
diff --git a/toolkit/mozapps/update/updater/launchchild_osx.mm b/toolkit/mozapps/update/updater/launchchild_osx.mm
index 95c39f3d0e09..37677e8899f0 100644
--- a/toolkit/mozapps/update/updater/launchchild_osx.mm
+++ b/toolkit/mozapps/update/updater/launchchild_osx.mm
@@ -254,6 +254,7 @@ bool ObtainUpdaterArguments(int* argc, char*** argv) {
@end
+#ifndef TOR_BROWSER_UPDATE
bool ServeElevatedUpdate(int argc, const char** argv) {
MacAutoreleasePool pool;
@@ -269,6 +270,7 @@ bool ServeElevatedUpdate(int argc, const char** argv) {
[updater release];
return didSucceed;
}
+#endif
bool IsOwnedByGroupAdmin(const char* aAppBundle) {
MacAutoreleasePool pool;
diff --git a/toolkit/mozapps/update/updater/moz.build b/toolkit/mozapps/update/updater/moz.build
index a0eff9a3b7cd..ecc634c87037 100644
--- a/toolkit/mozapps/update/updater/moz.build
+++ b/toolkit/mozapps/update/updater/moz.build
@@ -49,7 +49,7 @@ xpcshell_cert.script = 'gen_cert_header.py:create_header'
dep1_cert.script = 'gen_cert_header.py:create_header'
dep2_cert.script = 'gen_cert_header.py:create_header'
-if CONFIG['MOZ_UPDATE_CHANNEL'] in ('beta', 'release', 'esr'):
+if CONFIG['MOZ_UPDATE_CHANNEL'] in ('alpha', 'beta', 'release', 'esr'):
primary_cert.inputs += ['release_primary.der']
secondary_cert.inputs += ['release_secondary.der']
elif CONFIG['MOZ_UPDATE_CHANNEL'] in ('nightly', 'aurora', 'nightly-elm',
diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
index a04227d7b99e..226354d5e753 100644
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -16,7 +16,7 @@
* updatev3.manifest
* -----------------
* method = "add" | "add-if" | "add-if-not" | "patch" | "patch-if" |
- * "remove" | "rmdir" | "rmrfdir" | type
+ * "remove" | "rmdir" | "rmrfdir" | "addsymlink" | type
*
* 'add-if-not' adds a file if it doesn't exist.
*
@@ -78,7 +78,9 @@ bool IsRecursivelyWritable(const char* aPath);
void LaunchChild(int argc, const char** argv);
void LaunchMacPostProcess(const char* aAppBundle);
bool ObtainUpdaterArguments(int* argc, char*** argv);
+# ifndef TOR_BROWSER_UPDATE
bool ServeElevatedUpdate(int argc, const char** argv);
+# endif
void SetGroupOwnershipAndPermissions(const char* aAppBundle);
struct UpdateServerThreadArgs {
int argc;
@@ -478,9 +480,12 @@ static const NS_tchar* get_relative_path(const NS_tchar* fullpath) {
* The line from the manifest that contains the path.
* @param isdir
* Whether the path is a directory path. Defaults to false.
+ * @param islinktarget
+ * Whether the path is a symbolic link target. Defaults to false.
* @return valid filesystem path or nullptr if the path checks fail.
*/
-static NS_tchar* get_valid_path(NS_tchar** line, bool isdir = false) {
+static NS_tchar* get_valid_path(NS_tchar** line, bool isdir = false,
+ bool islinktarget = false) {
NS_tchar* path = mstrtok(kQuote, line);
if (!path) {
LOG(("get_valid_path: unable to determine path: " LOG_S, *line));
@@ -516,10 +521,12 @@ static NS_tchar* get_valid_path(NS_tchar** line, bool isdir = false) {
path[NS_tstrlen(path) - 1] = NS_T('\0');
}
- // Don't allow relative paths that resolve to a parent directory.
- if (NS_tstrstr(path, NS_T("..")) != nullptr) {
- LOG(("get_valid_path: paths must not contain '..': " LOG_S, path));
- return nullptr;
+ if (!islinktarget) {
+ // Don't allow relative paths that resolve to a parent directory.
+ if (NS_tstrstr(path, NS_T("..")) != nullptr) {
+ LOG(("get_valid_path: paths must not contain '..': " LOG_S, path));
+ return nullptr;
+ }
}
return path;
@@ -559,7 +566,7 @@ static void ensure_write_permissions(const NS_tchar* path) {
(void)_wchmod(path, _S_IREAD | _S_IWRITE);
#else
struct stat fs;
- if (!stat(path, &fs) && !(fs.st_mode & S_IWUSR)) {
+ if (!lstat(path, &fs) && !S_ISLNK(fs.st_mode) && !(fs.st_mode & S_IWUSR)) {
(void)chmod(path, fs.st_mode | S_IWUSR);
}
#endif
@@ -746,11 +753,9 @@ static int ensure_copy(const NS_tchar* path, const NS_tchar* dest) {
return READ_ERROR;
}
-# ifdef XP_UNIX
if (S_ISLNK(ss.st_mode)) {
return ensure_copy_symlink(path, dest);
}
-# endif
AutoFile infile(ensure_open(path, NS_T("rb"), ss.st_mode));
if (!infile) {
@@ -837,12 +842,19 @@ static int ensure_copy_recursive(const NS_tchar* path, const NS_tchar* dest,
return READ_ERROR;
}
-#ifdef XP_UNIX
+#ifndef XP_WIN
if (S_ISLNK(sInfo.st_mode)) {
return ensure_copy_symlink(path, dest);
}
#endif
+#ifdef XP_UNIX
+ // Ignore Unix domain sockets. See #20691.
+ if (S_ISSOCK(sInfo.st_mode)) {
+ return 0;
+ }
+#endif
+
if (!S_ISDIR(sInfo.st_mode)) {
return ensure_copy(path, dest);
}
@@ -899,7 +911,7 @@ static int rename_file(const NS_tchar* spath, const NS_tchar* dpath,
}
struct NS_tstat_t spathInfo;
- rv = NS_tstat(spath, &spathInfo);
+ rv = NS_tlstat(spath, &spathInfo); // Get info about file or symlink.
if (rv) {
LOG(("rename_file: failed to read file status info: " LOG_S ", "
"err: %d",
@@ -907,7 +919,12 @@ static int rename_file(const NS_tchar* spath, const NS_tchar* dpath,
return READ_ERROR;
}
- if (!S_ISREG(spathInfo.st_mode)) {
+#ifdef XP_WIN
+ if (!S_ISREG(spathInfo.st_mode))
+#else
+ if (!S_ISREG(spathInfo.st_mode) && !S_ISLNK(spathInfo.st_mode))
+#endif
+ {
if (allowDirs && !S_ISDIR(spathInfo.st_mode)) {
LOG(("rename_file: path present, but not a file: " LOG_S ", err: %d",
spath, errno));
@@ -916,7 +933,12 @@ static int rename_file(const NS_tchar* spath, const NS_tchar* dpath,
LOG(("rename_file: proceeding to rename the directory"));
}
- if (!NS_taccess(dpath, F_OK)) {
+#ifdef XP_WIN
+ if (!NS_taccess(dpath, F_OK))
+#else
+ if (!S_ISLNK(spathInfo.st_mode) && !NS_taccess(dpath, F_OK))
+#endif
+ {
if (ensure_remove(dpath)) {
LOG(
("rename_file: destination file exists and could not be "
@@ -936,7 +958,7 @@ static int rename_file(const NS_tchar* spath, const NS_tchar* dpath,
return OK;
}
-#ifdef XP_WIN
+#if defined(XP_WIN) && !defined(TOR_BROWSER_UPDATE)
// Remove the directory pointed to by path and all of its files and
// sub-directories. If a file is in use move it to the tobedeleted directory
// and attempt to schedule removal of the file on reboot
@@ -1035,7 +1057,19 @@ static int backup_restore(const NS_tchar* path, const NS_tchar* relPath) {
NS_tsnprintf(relBackup, sizeof(relBackup) / sizeof(relBackup[0]),
NS_T("%s") BACKUP_EXT, relPath);
- if (NS_taccess(backup, F_OK)) {
+ bool isLink = false;
+#ifndef XP_WIN
+ struct stat linkInfo;
+ int rv = lstat(backup, &linkInfo);
+ if (rv) {
+ LOG(("backup_restore: cannot get info for backup file: " LOG_S ", err: %d",
+ relBackup, errno));
+ return OK;
+ }
+ isLink = S_ISLNK(linkInfo.st_mode);
+#endif
+
+ if (!isLink && NS_taccess(backup, F_OK)) {
LOG(("backup_restore: backup file doesn't exist: " LOG_S, relBackup));
return OK;
}
@@ -1053,8 +1087,18 @@ static int backup_discard(const NS_tchar* path, const NS_tchar* relPath) {
NS_tsnprintf(relBackup, sizeof(relBackup) / sizeof(relBackup[0]),
NS_T("%s") BACKUP_EXT, relPath);
+ bool isLink = false;
+#ifndef XP_WIN
+ struct stat linkInfo;
+ int rv2 = lstat(backup, &linkInfo);
+ if (rv2) {
+ return OK; // File does not exist; nothing to do.
+ }
+ isLink = S_ISLNK(linkInfo.st_mode);
+#endif
+
// Nothing to discard
- if (NS_taccess(backup, F_OK)) {
+ if (!isLink && NS_taccess(backup, F_OK)) {
return OK;
}
@@ -1069,6 +1113,8 @@ static int backup_discard(const NS_tchar* path, const NS_tchar* relPath) {
relBackup, relPath));
return WRITE_ERROR_DELETE_BACKUP;
}
+
+# if !defined(TOR_BROWSER_UPDATE)
// The MoveFileEx call to remove the file on OS reboot will fail if the
// process doesn't have write access to the HKEY_LOCAL_MACHINE registry key
// but this is ok since the installer / uninstaller will delete the
@@ -1085,6 +1131,7 @@ static int backup_discard(const NS_tchar* path, const NS_tchar* relPath) {
"file: " LOG_S,
relPath));
}
+# endif
}
#else
if (rv) {
@@ -1139,7 +1186,7 @@ class Action {
class RemoveFile : public Action {
public:
- RemoveFile() : mSkip(0) {}
+ RemoveFile() : mSkip(0), mIsLink(0) {}
int Parse(NS_tchar* line) override;
int Prepare() override;
@@ -1150,6 +1197,7 @@ class RemoveFile : public Action {
mozilla::UniquePtr<NS_tchar[]> mFile;
mozilla::UniquePtr<NS_tchar[]> mRelPath;
int mSkip;
+ int mIsLink;
};
int RemoveFile::Parse(NS_tchar* line) {
@@ -1172,28 +1220,39 @@ int RemoveFile::Parse(NS_tchar* line) {
}
int RemoveFile::Prepare() {
- // Skip the file if it already doesn't exist.
- int rv = NS_taccess(mFile.get(), F_OK);
- if (rv) {
- mSkip = 1;
- mProgressCost = 0;
- return OK;
+ int rv;
+#ifndef XP_WIN
+ struct stat linkInfo;
+ rv = lstat(mFile.get(), &linkInfo);
+ mIsLink = ((0 == rv) && S_ISLNK(linkInfo.st_mode));
+#endif
+
+ if (!mIsLink) {
+ // Skip the file if it already doesn't exist.
+ rv = NS_taccess(mFile.get(), F_OK);
+ if (rv) {
+ mSkip = 1;
+ mProgressCost = 0;
+ return OK;
+ }
}
LOG(("PREPARE REMOVEFILE " LOG_S, mRelPath.get()));
- // Make sure that we're actually a file...
- struct NS_tstat_t fileInfo;
- rv = NS_tstat(mFile.get(), &fileInfo);
- if (rv) {
- LOG(("failed to read file status info: " LOG_S ", err: %d", mFile.get(),
- errno));
- return READ_ERROR;
- }
+ if (!mIsLink) {
+ // Make sure that we're actually a file...
+ struct NS_tstat_t fileInfo;
+ rv = NS_tstat(mFile.get(), &fileInfo);
+ if (rv) {
+ LOG(("failed to read file status info: " LOG_S ", err: %d", mFile.get(),
+ errno));
+ return READ_ERROR;
+ }
- if (!S_ISREG(fileInfo.st_mode)) {
- LOG(("path present, but not a file: " LOG_S, mFile.get()));
- return DELETE_ERROR_EXPECTED_FILE;
+ if (!S_ISREG(fileInfo.st_mode)) {
+ LOG(("path present, but not a file: " LOG_S, mFile.get()));
+ return DELETE_ERROR_EXPECTED_FILE;
+ }
}
NS_tchar* slash = (NS_tchar*)NS_tstrrchr(mFile.get(), NS_T('/'));
@@ -1222,7 +1281,13 @@ int RemoveFile::Execute() {
// The file is checked for existence here and in Prepare since it might have
// been removed by a separate instruction: bug 311099.
- int rv = NS_taccess(mFile.get(), F_OK);
+ int rv = 0;
+ if (mIsLink) {
+ struct NS_tstat_t linkInfo;
+ rv = NS_tlstat(mFile.get(), &linkInfo);
+ } else {
+ rv = NS_taccess(mFile.get(), F_OK);
+ }
if (rv) {
LOG(("file cannot be removed because it does not exist; skipping"));
mSkip = 1;
@@ -1945,6 +2010,92 @@ void PatchIfFile::Finish(int status) {
PatchFile::Finish(status);
}
+#ifndef XP_WIN
+class AddSymlink : public Action {
+ public:
+ AddSymlink() : mAdded(false) {}
+
+ virtual int Parse(NS_tchar* line);
+ virtual int Prepare();
+ virtual int Execute();
+ virtual void Finish(int status);
+
+ private:
+ mozilla::UniquePtr<NS_tchar[]> mLinkPath;
+ mozilla::UniquePtr<NS_tchar[]> mRelPath;
+ mozilla::UniquePtr<NS_tchar[]> mTarget;
+ bool mAdded;
+};
+
+int AddSymlink::Parse(NS_tchar* line) {
+ // format "<linkname>" "target"
+
+ NS_tchar* validPath = get_valid_path(&line);
+ if (!validPath) return PARSE_ERROR;
+
+ mRelPath = mozilla::MakeUnique<NS_tchar[]>(MAXPATHLEN);
+ NS_tstrcpy(mRelPath.get(), validPath);
+ mLinkPath.reset(get_full_path(validPath));
+ if (!mLinkPath) {
+ return PARSE_ERROR;
+ }
+
+ // consume whitespace between args
+ NS_tchar* q = mstrtok(kQuote, &line);
+ if (!q) return PARSE_ERROR;
+
+ validPath = get_valid_path(&line, false, true);
+ if (!validPath) return PARSE_ERROR;
+
+ mTarget = mozilla::MakeUnique<NS_tchar[]>(MAXPATHLEN);
+ NS_tstrcpy(mTarget.get(), validPath);
+
+ return OK;
+}
+
+int AddSymlink::Prepare() {
+ LOG(("PREPARE ADDSYMLINK " LOG_S " -> " LOG_S, mRelPath.get(),
+ mTarget.get()));
+
+ return OK;
+}
+
+int AddSymlink::Execute() {
+ LOG(("EXECUTE ADDSYMLINK " LOG_S " -> " LOG_S, mRelPath.get(),
+ mTarget.get()));
+
+ // First make sure that we can actually get rid of any existing file or link.
+ struct stat linkInfo;
+ int rv = lstat(mLinkPath.get(), &linkInfo);
+ if ((0 == rv) && !S_ISLNK(linkInfo.st_mode)) {
+ rv = NS_taccess(mLinkPath.get(), F_OK);
+ }
+ if (rv == 0) {
+ rv = backup_create(mLinkPath.get());
+ if (rv) return rv;
+ } else {
+ rv = ensure_parent_dir(mLinkPath.get());
+ if (rv) return rv;
+ }
+
+ // Create the link.
+ rv = symlink(mTarget.get(), mLinkPath.get());
+ if (!rv) {
+ mAdded = true;
+ }
+
+ return rv;
+}
+
+void AddSymlink::Finish(int status) {
+ LOG(("FINISH ADDSYMLINK " LOG_S " -> " LOG_S, mRelPath.get(), mTarget.get()));
+ // When there is an update failure and a link has been added it is removed
+ // here since there might not be a backup to replace it.
+ if (status && mAdded) NS_tremove(mLinkPath.get());
+ backup_finish(mLinkPath.get(), mRelPath.get(), status);
+}
+#endif
+
//-----------------------------------------------------------------------------
#ifdef XP_WIN
@@ -2267,14 +2418,29 @@ static bool IsSecureUpdateStatusSucceeded(bool& isSucceeded) {
*/
static int CopyInstallDirToDestDir() {
// These files should not be copied over to the updated app
-#ifdef XP_WIN
-# define SKIPLIST_COUNT 3
-#elif XP_MACOSX
-# define SKIPLIST_COUNT 0
+#if defined(TOR_BROWSER_UPDATE) && !defined(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
+# ifdef XP_WIN
+# define SKIPLIST_COUNT 6
+# else
+# define SKIPLIST_COUNT 5
+# endif
#else
-# define SKIPLIST_COUNT 2
+# ifdef XP_WIN
+# define SKIPLIST_COUNT 3
+# elif XP_MACOSX
+# define SKIPLIST_COUNT 0
+# else
+# define SKIPLIST_COUNT 2
+# endif
#endif
copy_recursive_skiplist<SKIPLIST_COUNT> skiplist;
+#if defined(TOR_BROWSER_UPDATE) && !defined(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
+# ifdef XP_MACOSX
+ skiplist.append(0, gInstallDirPath, NS_T("Updated.app"));
+ skiplist.append(1, gInstallDirPath, NS_T("TorBrowser/UpdateInfo/updates/0"));
+# endif
+#endif
+
#ifndef XP_MACOSX
skiplist.append(0, gInstallDirPath, NS_T("updated"));
skiplist.append(1, gInstallDirPath, NS_T("updates/0"));
@@ -2283,6 +2449,19 @@ static int CopyInstallDirToDestDir() {
# endif
#endif
+#if defined(TOR_BROWSER_UPDATE) && !defined(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
+# ifdef XP_WIN
+ skiplist.append(SKIPLIST_COUNT - 3, gInstallDirPath,
+ NS_T("TorBrowser/Data/Browser/profile.default/parent.lock"));
+# else
+ skiplist.append(SKIPLIST_COUNT - 3, gInstallDirPath,
+ NS_T("TorBrowser/Data/Browser/profile.default/.parentlock"));
+# endif
+
+ skiplist.append(SKIPLIST_COUNT - 1, gInstallDirPath,
+ NS_T("TorBrowser/Data/Tor/lock"));
+#endif
+
return ensure_copy_recursive(gInstallDirPath, gWorkingDirPath, skiplist);
}
@@ -2420,7 +2599,9 @@ static int ProcessReplaceRequest() {
if (NS_taccess(deleteDir, F_OK)) {
NS_tmkdir(deleteDir, 0755);
}
+# if !defined(TOR_BROWSER_UPDATE)
remove_recursive_on_reboot(tmpDir, deleteDir);
+# endif
#endif
}
@@ -2428,8 +2609,45 @@ static int ProcessReplaceRequest() {
// On OS X, we we need to remove the staging directory after its Contents
// directory has been moved.
NS_tchar updatedAppDir[MAXPATHLEN];
+# if defined(TOR_BROWSER_UPDATE) && !defined(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
+ NS_tsnprintf(updatedAppDir, sizeof(updatedAppDir) / sizeof(updatedAppDir[0]),
+ NS_T("%s/Updated.app"), gInstallDirPath);
+ // For Tor Browser on OS X, we also need to copy everything else that is
+ // inside Updated.app.
+ NS_tDIR* dir = NS_topendir(updatedAppDir);
+ if (dir) {
+ NS_tdirent* entry;
+ while ((entry = NS_treaddir(dir)) != 0) {
+ if (NS_tstrcmp(entry->d_name, NS_T(".")) &&
+ NS_tstrcmp(entry->d_name, NS_T(".."))) {
+ NS_tchar childSrcPath[MAXPATHLEN];
+ NS_tsnprintf(childSrcPath,
+ sizeof(childSrcPath) / sizeof(childSrcPath[0]),
+ NS_T("%s/%s"), updatedAppDir, entry->d_name);
+ NS_tchar childDstPath[MAXPATHLEN];
+ NS_tsnprintf(childDstPath,
+ sizeof(childDstPath) / sizeof(childDstPath[0]),
+ NS_T("%s/%s"), gInstallDirPath, entry->d_name);
+ ensure_remove_recursive(childDstPath);
+ rv = rename_file(childSrcPath, childDstPath, true);
+ if (rv) {
+ LOG(("Moving " LOG_S " to " LOG_S " failed, err: %d", childSrcPath,
+ childDstPath, errno));
+ }
+ }
+ }
+
+ NS_tclosedir(dir);
+ } else {
+ LOG(("Updated.app dir can't be found: " LOG_S ", err: %d", updatedAppDir,
+ errno));
+ }
+# else
NS_tsnprintf(updatedAppDir, sizeof(updatedAppDir) / sizeof(updatedAppDir[0]),
NS_T("%s/Updated.app"), gPatchDirPath);
+# endif
+
+ // Remove the Updated.app directory.
ensure_remove_recursive(updatedAppDir);
#endif
@@ -2603,11 +2821,15 @@ static void UpdateThreadFunc(void* param) {
#ifdef XP_MACOSX
static void ServeElevatedUpdateThreadFunc(void* param) {
+# ifdef TOR_BROWSER_UPDATE
+ WriteStatusFile(ELEVATION_CANCELED);
+# else
UpdateServerThreadArgs* threadArgs = (UpdateServerThreadArgs*)param;
gSucceeded = ServeElevatedUpdate(threadArgs->argc, threadArgs->argv);
if (!gSucceeded) {
WriteStatusFile(ELEVATION_CANCELED);
}
+# endif
QuitProgressUI();
}
@@ -2631,7 +2853,7 @@ int LaunchCallbackAndPostProcessApps(int argc, NS_tchar** argv,
#endif
) {
if (argc > callbackIndex) {
-#if defined(XP_WIN)
+#if defined(XP_WIN) && !defined(TOR_BROWSER_UPDATE)
if (gSucceeded) {
if (!LaunchWinPostProcess(gInstallDirPath, gPatchDirPath)) {
fprintf(stderr, "The post update process was not launched");
@@ -2686,8 +2908,12 @@ int NS_main(int argc, NS_tchar** argv) {
UmaskContext umaskContext(0);
bool isElevated =
+# ifdef TOR_BROWSER_UPDATE
+ false;
+# else
strstr(argv[0], "/Library/PrivilegedHelperTools/org.mozilla.updater") !=
0;
+# endif
if (isElevated) {
if (!ObtainUpdaterArguments(&argc, &argv)) {
// Won't actually get here because ObtainUpdaterArguments will terminate
@@ -3311,6 +3537,26 @@ int NS_main(int argc, NS_tchar** argv) {
// using the service is because we are testing.
if (!useService && !noServiceFallback &&
updateLockFileHandle == INVALID_HANDLE_VALUE) {
+# ifdef TOR_BROWSER_UPDATE
+# ifdef TOR_BROWSER_DATA_OUTSIDE_APP_DIR
+ // Because the TorBrowser-Data directory that contains the user's
+ // profile is a sibling of the Tor Browser installation directory,
+ // the user probably has permission to apply updates. Therefore, to
+ // avoid potential security issues such as CVE-2015-0833, do not
+ // attempt to elevate privileges. Instead, write a "failed" message
+ // to the update status file (this function will return immediately
+ // after the CloseHandle(elevatedFileHandle) call below).
+# else
+ // Because the user profile is contained within the Tor Browser
+ // installation directory, the user almost certainly has permission to
+ // apply updates. Therefore, to avoid potential security issues such
+ // as CVE-2015-0833, do not attempt to elevate privileges. Instead,
+ // write a "failed" message to the update status file (this function
+ // will return immediately after the CloseHandle(elevatedFileHandle)
+ // call below).
+# endif
+ WriteStatusFile(WRITE_ERROR_ACCESS_DENIED);
+# else
// Get the secure ID before trying to update so it is possible to
// determine if the updater has created a new one.
char uuidStringBefore[UUID_LEN] = {'\0'};
@@ -3356,6 +3602,7 @@ int NS_main(int argc, NS_tchar** argv) {
gCopyOutputFiles = false;
WriteStatusFile(ELEVATION_CANCELED);
}
+# endif
}
// If we started the elevated updater, and it finished, check the secure
@@ -3703,6 +3950,7 @@ int NS_main(int argc, NS_tchar** argv) {
if (!sStagedUpdate && !sReplaceRequest && _wrmdir(gDeleteDirPath)) {
LOG(("NS_main: unable to remove directory: " LOG_S ", err: %d", DELETE_DIR,
errno));
+# if !defined(TOR_BROWSER_UPDATE)
// The directory probably couldn't be removed due to it containing files
// that are in use and will be removed on OS reboot. The call to remove the
// directory on OS reboot is done after the calls to remove the files so the
@@ -3721,6 +3969,7 @@ int NS_main(int argc, NS_tchar** argv) {
"directory: " LOG_S,
DELETE_DIR));
}
+# endif
}
#endif /* XP_WIN */
@@ -4362,7 +4611,13 @@ int DoUpdate() {
action = new AddIfNotFile();
} else if (NS_tstrcmp(token, NS_T("patch-if")) == 0) { // Patch if exists
action = new PatchIfFile();
- } else {
+ }
+#ifndef XP_WIN
+ else if (NS_tstrcmp(token, NS_T("addsymlink")) == 0) {
+ action = new AddSymlink();
+ }
+#endif
+ else {
LOG(("DoUpdate: unknown token: " LOG_S, token));
free(buf);
return PARSE_ERROR;
diff --git a/toolkit/xre/MacLaunchHelper.h b/toolkit/xre/MacLaunchHelper.h
index f8dc75ee4d08..ce816acd83e2 100644
--- a/toolkit/xre/MacLaunchHelper.h
+++ b/toolkit/xre/MacLaunchHelper.h
@@ -17,7 +17,9 @@ extern "C" {
* pid of the terminated process to confirm that it executed successfully.
*/
void LaunchChildMac(int aArgc, char** aArgv, pid_t* aPid = 0);
+#ifndef TOR_BROWSER_UPDATE
bool LaunchElevatedUpdate(int aArgc, char** aArgv, pid_t* aPid = 0);
+#endif
}
#endif
diff --git a/toolkit/xre/MacLaunchHelper.mm b/toolkit/xre/MacLaunchHelper.mm
index ec570ffab124..da2917c2a99e 100644
--- a/toolkit/xre/MacLaunchHelper.mm
+++ b/toolkit/xre/MacLaunchHelper.mm
@@ -40,6 +40,7 @@ void LaunchChildMac(int aArgc, char** aArgv, pid_t* aPid) {
}
}
+#ifndef TOR_BROWSER_UPDATE
BOOL InstallPrivilegedHelper() {
AuthorizationRef authRef = NULL;
OSStatus status = AuthorizationCreate(
@@ -116,3 +117,4 @@ bool LaunchElevatedUpdate(int aArgc, char** aArgv, pid_t* aPid) {
}
return didSucceed;
}
+#endif
diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
index 7981fc1d69d3..95ace327f8f8 100644
--- a/toolkit/xre/nsAppRunner.cpp
+++ b/toolkit/xre/nsAppRunner.cpp
@@ -3142,6 +3142,11 @@ static bool CheckCompatibility(nsIFile* aProfileDir, const nsCString& aVersion,
gLastAppBuildID.Assign(gAppData->buildID);
nsAutoCString buf;
+
+ nsAutoCString tbVersion(TOR_BROWSER_VERSION_QUOTED);
+ rv = parser.GetString("Compatibility", "LastTorBrowserVersion", buf);
+ if (NS_FAILED(rv) || !tbVersion.Equals(buf)) return false;
+
rv = parser.GetString("Compatibility", "LastOSABI", buf);
if (NS_FAILED(rv) || !aOSABI.Equals(buf)) return false;
@@ -3227,6 +3232,12 @@ static void WriteVersion(nsIFile* aProfileDir, const nsCString& aVersion,
PR_Write(fd, kHeader, sizeof(kHeader) - 1);
PR_Write(fd, aVersion.get(), aVersion.Length());
+ nsAutoCString tbVersion(TOR_BROWSER_VERSION_QUOTED);
+ static const char kTorBrowserVersionHeader[] =
+ NS_LINEBREAK "LastTorBrowserVersion=";
+ PR_Write(fd, kTorBrowserVersionHeader, sizeof(kTorBrowserVersionHeader) - 1);
+ PR_Write(fd, tbVersion.get(), tbVersion.Length());
+
static const char kOSABIHeader[] = NS_LINEBREAK "LastOSABI=";
PR_Write(fd, kOSABIHeader, sizeof(kOSABIHeader) - 1);
PR_Write(fd, aOSABI.get(), aOSABI.Length());
@@ -4615,8 +4626,17 @@ int XREMain::XRE_mainStartup(bool* aExitFlag) {
if (CheckArg("test-process-updates")) {
SaveToEnv("MOZ_TEST_PROCESS_UPDATES=1");
}
+# ifdef TOR_BROWSER_UPDATE
+ nsAutoCString compatVersion(TOR_BROWSER_VERSION_QUOTED);
+# endif
ProcessUpdates(mDirProvider.GetGREDir(), exeDir, updRoot, gRestartArgc,
- gRestartArgv, mAppData->version);
+ gRestartArgv,
+# ifdef TOR_BROWSER_UPDATE
+ compatVersion.get()
+# else
+ mAppData->version
+# endif
+ );
if (EnvHasValue("MOZ_TEST_PROCESS_UPDATES")) {
SaveToEnv("MOZ_TEST_PROCESS_UPDATES=");
*aExitFlag = true;
diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp
index a7bf142a57fe..9e128b0b04c7 100644
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -159,6 +159,13 @@ static nsresult GetInstallDirPath(nsIFile* appDir, nsACString& installDirPath) {
return NS_OK;
}
+#ifdef DEBUG
+static void dump_argv(const char* aPrefix, char** argv, int argc) {
+ printf("%s - %d args\n", aPrefix, argc);
+ for (int i = 0; i < argc; ++i) printf(" %d: %s\n", i, argv[i]);
+}
+#endif
+
static bool GetFile(nsIFile* dir, const nsACString& name,
nsCOMPtr<nsIFile>& result) {
nsresult rv;
@@ -220,6 +227,34 @@ typedef enum {
eAppliedService,
} UpdateStatus;
+#ifdef DEBUG
+static const char* UpdateStatusToString(UpdateStatus aStatus) {
+ const char* rv = "unknown";
+ switch (aStatus) {
+ case eNoUpdateAction:
+ rv = "NoUpdateAction";
+ break;
+ case ePendingUpdate:
+ rv = "PendingUpdate";
+ break;
+ case ePendingService:
+ rv = "PendingService";
+ break;
+ case ePendingElevate:
+ rv = "PendingElevate";
+ break;
+ case eAppliedUpdate:
+ rv = "AppliedUpdate";
+ break;
+ case eAppliedService:
+ rv = "AppliedService";
+ break;
+ }
+
+ return rv;
+}
+#endif
+
/**
* Returns a value indicating what needs to be done in order to handle an
* update.
@@ -292,9 +327,39 @@ static bool IsOlderVersion(nsIFile* versionFile, const char* appVersion) {
return false;
}
+#ifdef DEBUG
+ printf("IsOlderVersion checking appVersion %s against updateVersion %s\n",
+ appVersion, buf);
+#endif
+
return mozilla::Version(appVersion) > buf;
}
+#ifndef TOR_BROWSER_DATA_OUTSIDE_APP_DIR
+# if defined(TOR_BROWSER_UPDATE) && defined(XP_MACOSX)
+static nsresult GetUpdateDirFromAppDir(nsIFile* aAppDir, nsIFile** aResult) {
+ // On Mac OSX, we stage the update to an Updated.app directory that is
+ // directly below the main Tor Browser.app directory (two levels up from
+ // the appDir).
+ NS_ENSURE_ARG_POINTER(aAppDir);
+ NS_ENSURE_ARG_POINTER(aResult);
+ nsCOMPtr<nsIFile> parentDir1, parentDir2;
+ nsresult rv = aAppDir->GetParent(getter_AddRefs(parentDir1));
+ NS_ENSURE_SUCCESS(rv, rv);
+ rv = parentDir1->GetParent(getter_AddRefs(parentDir2));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ nsCOMPtr<nsIFile> updatedDir;
+ if (!GetFile(parentDir2, "Updated.app"_ns, updatedDir)) {
+ return NS_ERROR_FAILURE;
+ }
+
+ updatedDir.forget(aResult);
+ return NS_OK;
+}
+# endif
+#endif
+
/**
* Applies, switches, or stages an update.
*
@@ -442,7 +507,12 @@ static void ApplyUpdate(nsIFile* greDir, nsIFile* updateDir, nsIFile* appDir,
} else {
// Get the directory where the update is staged or will be staged.
#if defined(XP_MACOSX)
+# if defined(TOR_BROWSER_UPDATE) && !defined(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
+ rv = GetUpdateDirFromAppDir(appDir, getter_AddRefs(updatedDir));
+ if (NS_FAILED(rv)) {
+# else
if (!GetFile(updateDir, "Updated.app"_ns, updatedDir)) {
+# endif
#else
if (!GetFile(appDir, "updated"_ns, updatedDir)) {
#endif
@@ -537,6 +607,9 @@ static void ApplyUpdate(nsIFile* greDir, nsIFile* updateDir, nsIFile* appDir,
}
LOG(("spawning updater process [%s]\n", updaterPath.get()));
+#ifdef DEBUG
+ dump_argv("ApplyUpdate updater", argv, argc);
+#endif
#if defined(XP_UNIX) && !defined(XP_MACOSX)
// We use execv to spawn the updater process on all UNIX systems except Mac
@@ -574,6 +647,10 @@ static void ApplyUpdate(nsIFile* greDir, nsIFile* updateDir, nsIFile* appDir,
}
#elif defined(XP_MACOSX)
UpdateDriverSetupMacCommandLine(argc, argv, restart);
+# ifdef DEBUG
+dump_argv("ApplyUpdate after SetupMacCommandLine", argv, argc);
+# endif
+# ifndef TOR_BROWSER_UPDATE
// We need to detect whether elevation is required for this update. This can
// occur when an admin user installs the application, but another admin
// user attempts to update (see bug 394984).
@@ -586,6 +663,7 @@ if (restart && !IsRecursivelyWritable(installDirPath.get())) {
}
exit(0);
}
+# endif
if (isStaged) {
// Launch the updater to replace the installation with the staged updated.
@@ -656,9 +734,27 @@ static bool ProcessHasTerminated(ProcessType pt) {
nsresult ProcessUpdates(nsIFile* greDir, nsIFile* appDir, nsIFile* updRootDir,
int argc, char** argv, const char* appVersion,
bool restart, ProcessType* pid) {
+#if defined(XP_WIN) && defined(TOR_BROWSER_UPDATE)
+ // Try to remove the "tobedeleted" directory which, if present, contains
+ // files that could not be removed during a previous update (e.g., DLLs
+ // that were in use and therefore locked by Windows).
+ nsCOMPtr<nsIFile> deleteDir;
+ nsresult winrv = appDir->Clone(getter_AddRefs(deleteDir));
+ if (NS_SUCCEEDED(winrv)) {
+ winrv = deleteDir->AppendNative("tobedeleted"_ns);
+ if (NS_SUCCEEDED(winrv)) {
+ winrv = deleteDir->Remove(true);
+ }
+ }
+#endif
+
nsresult rv;
nsCOMPtr<nsIFile> updatesDir;
+#ifdef DEBUG
+ printf("ProcessUpdates updateRootDir: %s appVersion: %s\n",
+ updRootDir->HumanReadablePath().get(), appVersion);
+#endif
rv = updRootDir->Clone(getter_AddRefs(updatesDir));
NS_ENSURE_SUCCESS(rv, rv);
rv = updatesDir->AppendNative("updates"_ns);
@@ -678,6 +774,12 @@ nsresult ProcessUpdates(nsIFile* greDir, nsIFile* appDir, nsIFile* updRootDir,
nsCOMPtr<nsIFile> statusFile;
UpdateStatus status = GetUpdateStatus(updatesDir, statusFile);
+#ifdef DEBUG
+ printf("ProcessUpdates status: %s (%d)\n", UpdateStatusToString(status),
+ status);
+ printf("ProcessUpdates updatesDir: %s\n",
+ updatesDir->HumanReadablePath().get());
+#endif
switch (status) {
case ePendingUpdate:
case ePendingService: {
@@ -741,13 +843,16 @@ nsUpdateProcessor::ProcessUpdate() {
NS_ENSURE_SUCCESS(rv, rv);
}
+ nsAutoCString appVersion;
+#ifdef TOR_BROWSER_UPDATE
+ appVersion = TOR_BROWSER_VERSION_QUOTED;
+#else
nsCOMPtr<nsIXULAppInfo> appInfo =
do_GetService("@mozilla.org/xre/app-info;1", &rv);
NS_ENSURE_SUCCESS(rv, rv);
-
- nsAutoCString appVersion;
rv = appInfo->GetVersion(appVersion);
NS_ENSURE_SUCCESS(rv, rv);
+#endif
// Copy the parameters to the StagedUpdateInfo structure shared with the
// watcher thread.
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index b2ea009553ad..2ec6929b01a5 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -1256,6 +1256,41 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
}
#endif
nsCOMPtr<nsIFile> updRoot;
+#if defined(TOR_BROWSER_UPDATE)
+ // For Tor Browser, we store update history, etc. within the UpdateInfo
+ // directory under the user data directory.
+ nsresult rv = GetTorBrowserUserDataDir(getter_AddRefs(updRoot));
+ NS_ENSURE_SUCCESS(rv, rv);
+ rv = updRoot->AppendNative("UpdateInfo"_ns);
+ NS_ENSURE_SUCCESS(rv, rv);
+# if defined(XP_MACOSX) && defined(TOR_BROWSER_DATA_OUTSIDE_APP_DIR)
+ // Since the TorBrowser-Data directory may be shared among different
+ // installations of the application, embed the app path in the update dir
+ // so that the update history is partitioned. This is much less likely to
+ // be an issue on Linux or Windows because the Tor Browser packages for
+ // those platforms include a "container" folder that provides partitioning
+ // by default, and we do not support use of a shared, OS-recommended area
+ // for user data on those platforms.
+ nsCOMPtr<nsIFile> appFile;
+ bool per = false;
+ rv = GetFile(XRE_EXECUTABLE_FILE, &per, getter_AddRefs(appFile));
+ NS_ENSURE_SUCCESS(rv, rv);
+ nsCOMPtr<nsIFile> appRootDirFile;
+ nsAutoString appDirPath;
+ if (NS_FAILED(appFile->GetParent(getter_AddRefs(appRootDirFile))) ||
+ NS_FAILED(appRootDirFile->GetPath(appDirPath))) {
+ return NS_ERROR_FAILURE;
+ }
+
+ int32_t dotIndex = appDirPath.RFind(".app");
+ if (dotIndex == kNotFound) {
+ dotIndex = appDirPath.Length();
+ }
+ appDirPath = Substring(appDirPath, 1, dotIndex - 1);
+ rv = updRoot->AppendRelativePath(appDirPath);
+ NS_ENSURE_SUCCESS(rv, rv);
+# endif
+#else // ! TOR_BROWSER_UPDATE
nsCOMPtr<nsIFile> appFile;
bool per = false;
nsresult rv = GetFile(XRE_EXECUTABLE_FILE, &per, getter_AddRefs(appFile));
@@ -1263,7 +1298,7 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
rv = appFile->GetParent(getter_AddRefs(updRoot));
NS_ENSURE_SUCCESS(rv, rv);
-#ifdef XP_MACOSX
+# ifdef XP_MACOSX
nsCOMPtr<nsIFile> appRootDirFile;
nsCOMPtr<nsIFile> localDir;
nsAutoString appDirPath;
@@ -1297,7 +1332,7 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
localDir.forget(aResult);
return NS_OK;
-#elif XP_WIN
+# elif XP_WIN
nsAutoString installPath;
rv = updRoot->GetPath(installPath);
NS_ENSURE_SUCCESS(rv, rv);
@@ -1326,7 +1361,8 @@ nsresult nsXREDirProvider::GetUpdateRootDir(nsIFile** aResult,
nsAutoString updatePathStr;
updatePathStr.Assign(updatePath.get());
updRoot->InitWithPath(updatePathStr);
-#endif // XP_WIN
+# endif // XP_WIN
+#endif // ! TOR_BROWSER_UPDATE
updRoot.forget(aResult);
return NS_OK;
}
diff --git a/tools/update-packaging/common.sh b/tools/update-packaging/common.sh
index 4b994f30169c..26eabbf31379 100755
--- a/tools/update-packaging/common.sh
+++ b/tools/update-packaging/common.sh
@@ -8,6 +8,10 @@
# Author: Darin Fisher
#
+# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
+# we should remove all lines in this file that contain:
+# TorBrowser/Data
+
# -----------------------------------------------------------------------------
QUIET=0
@@ -76,17 +80,8 @@ make_add_instruction() {
forced=
fi
- is_extension=$(echo "$f" | grep -c 'distribution/extensions/.*/')
- if [ $is_extension = "1" ]; then
- # Use the subdirectory of the extensions folder as the file to test
- # before performing this add instruction.
- testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/')
- verbose_notice " add-if \"$testdir\" \"$f\""
- echo "add-if \"$testdir\" \"$f\"" >> "$filev3"
- else
- verbose_notice " add \"$f\"$forced"
- echo "add \"$f\"" >> "$filev3"
- fi
+ verbose_notice " add \"$f\"$forced"
+ echo "add \"$f\"" >> "$filev3"
}
check_for_add_if_not_update() {
@@ -109,21 +104,21 @@ make_add_if_not_instruction() {
echo "add-if-not \"$f\" \"$f\"" >> "$filev3"
}
+make_addsymlink_instruction() {
+ link="$1"
+ target="$2"
+ filev3="$3"
+
+ verbose_notice " addsymlink: $link -> $target"
+ echo "addsymlink \"$link\" \"$target\"" >> "$filev3"
+}
+
make_patch_instruction() {
f="$1"
filev3="$2"
- is_extension=$(echo "$f" | grep -c 'distribution/extensions/.*/')
- if [ $is_extension = "1" ]; then
- # Use the subdirectory of the extensions folder as the file to test
- # before performing this add instruction.
- testdir=$(echo "$f" | sed 's/\(.*distribution\/extensions\/[^\/]*\)\/.*/\1/')
- verbose_notice " patch-if \"$testdir\" \"$f.patch\" \"$f\""
- echo "patch-if \"$testdir\" \"$f.patch\" \"$f\"" >> "$filev3"
- else
- verbose_notice " patch \"$f.patch\" \"$f\""
- echo "patch \"$f.patch\" \"$f\"" >> "$filev3"
- fi
+ verbose_notice " patch \"$f.patch\" \"$f\""
+ echo "patch \"$f.patch\" \"$f\"" >> "$filev3"
}
append_remove_instructions() {
@@ -168,6 +163,10 @@ append_remove_instructions() {
# List all files in the current directory, stripping leading "./"
# Pass a variable name and it will be filled as an array.
+# To support Tor Browser updates, skip the following files:
+# TorBrowser/Data/Browser/profiles.ini
+# TorBrowser/Data/Browser/profile.default/bookmarks.html
+# TorBrowser/Data/Tor/torrc
list_files() {
count=0
temp_filelist=$(mktemp)
@@ -178,6 +177,11 @@ list_files() {
| sed 's/\.\/\(.*\)/\1/' \
| sort -r > "${temp_filelist}"
while read file; do
+ if [ "$file" = "TorBrowser/Data/Browser/profiles.ini" -o \
+ "$file" = "TorBrowser/Data/Browser/profile.default/bookmarks.html" -o \
+ "$file" = "TorBrowser/Data/Tor/torrc" ]; then
+ continue;
+ fi
eval "${1}[$count]=\"$file\""
(( count++ ))
done < "${temp_filelist}"
@@ -199,3 +203,19 @@ list_dirs() {
done < "${temp_dirlist}"
rm "${temp_dirlist}"
}
+
+# List all symbolic links in the current directory, stripping leading "./"
+list_symlinks() {
+ count=0
+
+ find . -type l \
+ | sed 's/\.\/\(.*\)/\1/' \
+ | sort -r > "temp-symlinklist"
+ while read symlink; do
+ target=$(readlink "$symlink")
+ eval "${1}[$count]=\"$symlink\""
+ eval "${2}[$count]=\"$target\""
+ (( count++ ))
+ done < "temp-symlinklist"
+ rm "temp-symlinklist"
+}
diff --git a/tools/update-packaging/make_full_update.sh b/tools/update-packaging/make_full_update.sh
index db2c5898efdc..603988997405 100755
--- a/tools/update-packaging/make_full_update.sh
+++ b/tools/update-packaging/make_full_update.sh
@@ -71,6 +71,7 @@ if [ ! -f "precomplete" ]; then
fi
list_files files
+list_symlinks symlinks symlink_targets
popd
@@ -81,6 +82,21 @@ notice "Adding type instruction to update manifests"
notice " type complete"
echo "type \"complete\"" >> "$updatemanifestv3"
+# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
+# we should remove the following lines:
+# If removal of any old, existing directories is desired, emit the appropriate
+# rmrfdir commands.
+notice ""
+notice "Adding directory removal instructions to update manifests"
+for dir_to_remove in $directories_to_remove; do
+ # rmrfdir requires a trailing slash; if slash is missing, add one.
+ if ! [[ "$dir_to_remove" =~ /$ ]]; then
+ dir_to_remove="${dir_to_remove}/"
+ fi
+ echo "rmrfdir \"$dir_to_remove\"" >> "$updatemanifestv3"
+done
+# END TOR_BROWSER_DATA_OUTSIDE_APP_DIR removal
+
notice ""
notice "Adding file add instructions to update manifests"
num_files=${#files[*]}
@@ -102,6 +118,15 @@ for ((i=0; $i<$num_files; i=$i+1)); do
targetfiles="$targetfiles \"$f\""
done
+notice ""
+notice "Adding symlink add instructions to update manifests"
+num_symlinks=${#symlinks[*]}
+for ((i=0; $i<$num_symlinks; i=$i+1)); do
+ link="${symlinks[$i]}"
+ target="${symlink_targets[$i]}"
+ make_addsymlink_instruction "$link" "$target" "$updatemanifestv3"
+done
+
# Append remove instructions for any dead files.
notice ""
notice "Adding file and directory remove instructions from file 'removed-files'"
diff --git a/tools/update-packaging/make_incremental_update.sh b/tools/update-packaging/make_incremental_update.sh
index 24d68616731a..1adfef8fd96e 100755
--- a/tools/update-packaging/make_incremental_update.sh
+++ b/tools/update-packaging/make_incremental_update.sh
@@ -78,7 +78,11 @@ if [ $# = 0 ]; then
exit 1
fi
-requested_forced_updates='Contents/MacOS/firefox'
+# Firefox uses requested_forced_updates='Contents/MacOS/firefox' due to
+# 770996 but in Tor Browser we do not need that fix.
+requested_forced_updates=""
+directories_to_remove=""
+extra_files_to_remove=""
while getopts "hqf:" flag
do
@@ -114,6 +118,28 @@ workdir="$(mktemp -d)"
updatemanifestv3="$workdir/updatev3.manifest"
archivefiles="updatev3.manifest"
+# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
+# we should remove the following lines:
+# If the NoScript extension has changed between
+# releases, add it to the "force updates" list.
+ext_path='TorBrowser/Data/Browser/profile.default/extensions'
+if [ -d "$newdir/$ext_path" ]; then
+ noscript='{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi'
+
+ # NoScript is a packed extension, so we simply compare the old and the new
+ # .xpi files.
+ noscript_path="$ext_path/$noscript"
+ diff -a "$olddir/$noscript_path" "$newdir/$noscript_path" > /dev/null
+ rc=$?
+ if [ $rc -gt 1 ]; then
+ notice "Unexpected exit $rc from $noscript_path diff command"
+ exit 2
+ elif [ $rc -eq 1 ]; then
+ requested_forced_updates="$requested_forced_updates $noscript_path"
+ fi
+fi
+# END TOR_BROWSER_DATA_OUTSIDE_APP_DIR removal
+
mkdir -p "$workdir"
# Generate a list of all files in the target directory.
@@ -124,6 +150,7 @@ fi
list_files oldfiles
list_dirs olddirs
+list_symlinks oldsymlinks oldsymlink_targets
popd
@@ -141,6 +168,7 @@ fi
list_dirs newdirs
list_files newfiles
+list_symlinks newsymlinks newsymlink_targets
popd
@@ -151,6 +179,22 @@ notice "Adding type instruction to update manifests"
notice " type partial"
echo "type \"partial\"" >> $updatemanifestv3
+# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
+# we should remove the following lines:
+# If removal of any old, existing directories is desired, emit the appropriate
+# rmrfdir commands.
+notice ""
+notice "Adding directory removal instructions to update manifests"
+for dir_to_remove in $directories_to_remove; do
+ # rmrfdir requires a trailing slash, so add one if missing.
+ if ! [[ "$dir_to_remove" =~ /$ ]]; then
+ dir_to_remove="${dir_to_remove}/"
+ fi
+ echo "rmrfdir \"$dir_to_remove\"" >> "$updatemanifestv3"
+done
+# END TOR_BROWSER_DATA_OUTSIDE_APP_DIR removal
+
+
notice ""
notice "Adding file patch and add instructions to update manifests"
@@ -242,6 +286,23 @@ for ((i=0; $i<$num_oldfiles; i=$i+1)); do
fi
done
+# Remove and re-add symlinks
+notice ""
+notice "Adding symlink remove/add instructions to update manifests"
+num_oldsymlinks=${#oldsymlinks[*]}
+for ((i=0; $i<$num_oldsymlinks; i=$i+1)); do
+ link="${oldsymlinks[$i]}"
+ verbose_notice " remove: $link"
+ echo "remove \"$link\"" >> "$updatemanifestv3"
+done
+
+num_newsymlinks=${#newsymlinks[*]}
+for ((i=0; $i<$num_newsymlinks; i=$i+1)); do
+ link="${newsymlinks[$i]}"
+ target="${newsymlink_targets[$i]}"
+ make_addsymlink_instruction "$link" "$target" "$updatemanifestv3"
+done
+
# Newly added files
notice ""
notice "Adding file add instructions to update manifests"
@@ -286,6 +347,14 @@ notice ""
notice "Adding file and directory remove instructions from file 'removed-files'"
append_remove_instructions "$newdir" "$updatemanifestv3"
+# TODO When TOR_BROWSER_DATA_OUTSIDE_APP_DIR is used on all platforms,
+# we should remove the following lines:
+for f in $extra_files_to_remove; do
+ notice " remove \"$f\""
+ echo "remove \"$f\"" >> "$updatemanifestv3"
+done
+# END TOR_BROWSER_DATA_OUTSIDE_APP_DIR removal
+
notice ""
notice "Adding directory remove instructions for directories that no longer exist"
num_olddirs=${#olddirs[*]}
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 19121: reinstate the update.xml hash check
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit 1a49bc724e1ce8f6976f52a981d18b7fef3b01b7
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Mon Apr 23 15:22:57 2018 -0400
Bug 19121: reinstate the update.xml hash check
Revert most changes from Mozilla Bug 1373267 "Remove hashFunction and
hashValue attributes from nsIUpdatePatch and code related to these
attributes." Changes to the tests were not reverted; the tests have
been changed significantly and we do not run automated updater tests
for Tor Browser at this time.
Also partial revert of commit f1241db6986e4b54473a1ed870f7584c75d51122.
Revert the nsUpdateService.js changes from Mozilla Bug 862173 "don't
verify mar file hash when using mar signing to verify the mar file
(lessens main thread I/O)."
Changes to the tests were not reverted; the tests have been changed
significantly and we do not run automated updater tests for
Tor Browser at this time.
We kept the addition to the AppConstants API in case other JS code
references it in the future.
---
toolkit/modules/AppConstants.jsm | 7 ++++
toolkit/mozapps/update/UpdateService.jsm | 63 ++++++++++++++++++++++++++++-
toolkit/mozapps/update/UpdateTelemetry.jsm | 1 +
toolkit/mozapps/update/nsIUpdateService.idl | 11 +++++
4 files changed, 81 insertions(+), 1 deletion(-)
diff --git a/toolkit/modules/AppConstants.jsm b/toolkit/modules/AppConstants.jsm
index 36e8fb37d400..2d59df17ab27 100644
--- a/toolkit/modules/AppConstants.jsm
+++ b/toolkit/modules/AppConstants.jsm
@@ -212,6 +212,13 @@ this.AppConstants = Object.freeze({
false,
#endif
+ MOZ_VERIFY_MAR_SIGNATURE:
+#ifdef MOZ_VERIFY_MAR_SIGNATURE
+ true,
+#else
+ false,
+#endif
+
MOZ_MAINTENANCE_SERVICE:
#ifdef MOZ_MAINTENANCE_SERVICE
true,
diff --git a/toolkit/mozapps/update/UpdateService.jsm b/toolkit/mozapps/update/UpdateService.jsm
index e6dc8e8c0081..aa8ae5746f97 100644
--- a/toolkit/mozapps/update/UpdateService.jsm
+++ b/toolkit/mozapps/update/UpdateService.jsm
@@ -799,6 +799,20 @@ function LOG(string) {
}
}
+/**
+ * Convert a string containing binary values to hex.
+ */
+function binaryToHex(input) {
+ var result = "";
+ for (var i = 0; i < input.length; ++i) {
+ var hex = input.charCodeAt(i).toString(16);
+ if (hex.length == 1)
+ hex = "0" + hex;
+ result += hex;
+ }
+ return result;
+}
+
/**
* Gets the specified directory at the specified hierarchy under the
* update root directory and creates it if it doesn't exist.
@@ -1612,6 +1626,8 @@ function UpdatePatch(patch) {
}
break;
case "finalURL":
+ case "hashFunction":
+ case "hashValue":
case "state":
case "type":
case "URL":
@@ -1631,6 +1647,8 @@ UpdatePatch.prototype = {
// over writing nsIUpdatePatch attributes.
_attrNames: [
"errorCode",
+ "hashFunction",
+ "hashValue",
"finalURL",
"selected",
"size",
@@ -1644,6 +1662,8 @@ UpdatePatch.prototype = {
*/
serialize: function UpdatePatch_serialize(updates) {
var patch = updates.createElementNS(URI_UPDATE_NS, "patch");
+ patch.setAttribute("hashFunction", this.hashFunction);
+ patch.setAttribute("hashValue", this.hashValue);
patch.setAttribute("size", this.size);
patch.setAttribute("type", this.type);
patch.setAttribute("URL", this.URL);
@@ -4478,7 +4498,42 @@ Downloader.prototype = {
}
LOG("Downloader:_verifyDownload downloaded size == expected size.");
- return true;
+ let fileStream = Cc["@mozilla.org/network/file-input-stream;1"].
+ createInstance(Ci.nsIFileInputStream);
+ fileStream.init(destination, FileUtils.MODE_RDONLY, FileUtils.PERMS_FILE, 0);
+
+ let digest;
+ try {
+ let hash = Cc["@mozilla.org/security/hash;1"].
+ createInstance(Ci.nsICryptoHash);
+ var hashFunction = Ci.nsICryptoHash[this._patch.hashFunction.toUpperCase()];
+ if (hashFunction == undefined) {
+ throw Cr.NS_ERROR_UNEXPECTED;
+ }
+ hash.init(hashFunction);
+ hash.updateFromStream(fileStream, -1);
+ // NOTE: For now, we assume that the format of _patch.hashValue is hex
+ // encoded binary (such as what is typically output by programs like
+ // sha1sum). In the future, this may change to base64 depending on how
+ // we choose to compute these hashes.
+ digest = binaryToHex(hash.finish(false));
+ } catch (e) {
+ LOG("Downloader:_verifyDownload - failed to compute hash of the " +
+ "downloaded update archive");
+ digest = "";
+ }
+
+ fileStream.close();
+
+ if (digest == this._patch.hashValue.toLowerCase()) {
+ LOG("Downloader:_verifyDownload hashes match.");
+ return true;
+ }
+
+ LOG("Downloader:_verifyDownload hashes do not match. ");
+ AUSTLMY.pingDownloadCode(this.isCompleteUpdate,
+ AUSTLMY.DWNLD_ERR_VERIFY_NO_HASH_MATCH);
+ return false;
},
/**
@@ -5070,6 +5125,9 @@ Downloader.prototype = {
" is higher than patch size: " +
this._patch.size
);
+ // It's important that we use a different code than
+ // NS_ERROR_CORRUPTED_CONTENT so that tests can verify the difference
+ // between a hash error and a wrong download error.
AUSTLMY.pingDownloadCode(
this.isCompleteUpdate,
AUSTLMY.DWNLD_ERR_PATCH_SIZE_LARGER
@@ -5088,6 +5146,9 @@ Downloader.prototype = {
" is not equal to expected patch size: " +
this._patch.size
);
+ // It's important that we use a different code than
+ // NS_ERROR_CORRUPTED_CONTENT so that tests can verify the difference
+ // between a hash error and a wrong download error.
AUSTLMY.pingDownloadCode(
this.isCompleteUpdate,
AUSTLMY.DWNLD_ERR_PATCH_SIZE_NOT_EQUAL
diff --git a/toolkit/mozapps/update/UpdateTelemetry.jsm b/toolkit/mozapps/update/UpdateTelemetry.jsm
index c2018042f164..20c166849a5a 100644
--- a/toolkit/mozapps/update/UpdateTelemetry.jsm
+++ b/toolkit/mozapps/update/UpdateTelemetry.jsm
@@ -180,6 +180,7 @@ var AUSTLMY = {
DWNLD_ERR_VERIFY_NO_REQUEST: 13,
DWNLD_ERR_VERIFY_PATCH_SIZE_NOT_EQUAL: 14,
DWNLD_ERR_WRITE_FAILURE: 15,
+ DWNLD_ERR_VERIFY_NO_HASH_MATCH: 16,
// Temporary failure code to see if there are failures without an update phase
DWNLD_UNKNOWN_PHASE_ERR_WRITE_FAILURE: 40,
diff --git a/toolkit/mozapps/update/nsIUpdateService.idl b/toolkit/mozapps/update/nsIUpdateService.idl
index 6c11516cbc20..86d24677376b 100644
--- a/toolkit/mozapps/update/nsIUpdateService.idl
+++ b/toolkit/mozapps/update/nsIUpdateService.idl
@@ -39,6 +39,17 @@ interface nsIUpdatePatch : nsISupports
*/
attribute AString finalURL;
+ /**
+ * The hash function to use when determining this file's integrity
+ */
+ attribute AString hashFunction;
+
+ /**
+ * The value of the hash function named above that should be computed if
+ * this file is not corrupt.
+ */
+ attribute AString hashValue;
+
/**
* The size of this file, in bytes.
*/
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 28369: Stop shipping pingsender executable
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit 1f268a7488af613b900aa784ba5b6d1a35ad8c43
Author: Alex Catarineu <acat(a)torproject.org>
Date: Wed Apr 10 17:52:51 2019 +0200
Bug 28369: Stop shipping pingsender executable
---
browser/app/macbuild/Contents/MacOS-files.in | 1 -
browser/installer/package-manifest.in | 4 ----
browser/installer/windows/nsis/shared.nsh | 1 -
python/mozbuild/mozbuild/artifacts.py | 2 --
toolkit/components/telemetry/app/TelemetrySend.jsm | 19 +------------------
toolkit/components/telemetry/moz.build | 4 ----
6 files changed, 1 insertion(+), 30 deletions(-)
diff --git a/browser/app/macbuild/Contents/MacOS-files.in b/browser/app/macbuild/Contents/MacOS-files.in
index 3c6a1db5d6ea..bebc656a0a05 100644
--- a/browser/app/macbuild/Contents/MacOS-files.in
+++ b/browser/app/macbuild/Contents/MacOS-files.in
@@ -16,7 +16,6 @@
#if defined(MOZ_CRASHREPORTER)
/minidump-analyzer
#endif
-/pingsender
/pk12util
/ssltunnel
/xpcshell
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index 937afa28fd71..6c314a352c3b 100644
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -448,10 +448,6 @@ bin/libfreebl_64int_3.so
@BINPATH@/minidump-analyzer@BIN_SUFFIX@
#endif
-; [ Ping Sender ]
-;
-@BINPATH@/pingsender@BIN_SUFFIX@
-
; Shutdown Terminator
@RESPATH@/components/terminator.manifest
diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh
index 0529ac4529db..c556fe016af0 100755
--- a/browser/installer/windows/nsis/shared.nsh
+++ b/browser/installer/windows/nsis/shared.nsh
@@ -1472,7 +1472,6 @@ ${EndIf}
Push "crashreporter.exe"
Push "default-browser-agent.exe"
Push "minidump-analyzer.exe"
- Push "pingsender.exe"
Push "updater.exe"
Push "updateagent.exe"
Push "${FileMainEXE}"
diff --git a/python/mozbuild/mozbuild/artifacts.py b/python/mozbuild/mozbuild/artifacts.py
index 8c0f90033638..18f41039a6bb 100644
--- a/python/mozbuild/mozbuild/artifacts.py
+++ b/python/mozbuild/mozbuild/artifacts.py
@@ -423,7 +423,6 @@ class LinuxArtifactJob(ArtifactJob):
'{product}/{product}',
'{product}/{product}-bin',
'{product}/minidump-analyzer',
- '{product}/pingsender',
'{product}/plugin-container',
'{product}/updater',
'{product}/**/*.so',
@@ -485,7 +484,6 @@ class MacArtifactJob(ArtifactJob):
'libosclientcerts.dylib',
'libsoftokn3.dylib',
'minidump-analyzer',
- 'pingsender',
'plugin-container.app/Contents/MacOS/plugin-container',
'updater.app/Contents/MacOS/org.mozilla.updater',
# 'xpcshell',
diff --git a/toolkit/components/telemetry/app/TelemetrySend.jsm b/toolkit/components/telemetry/app/TelemetrySend.jsm
index caf11f440681..ce27382be7e0 100644
--- a/toolkit/components/telemetry/app/TelemetrySend.jsm
+++ b/toolkit/components/telemetry/app/TelemetrySend.jsm
@@ -1578,23 +1578,6 @@ var TelemetrySendImpl = {
},
runPingSender(pings, observer) {
- if (AppConstants.platform === "android") {
- throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
- }
-
- const exeName =
- AppConstants.platform === "win" ? "pingsender.exe" : "pingsender";
-
- let exe = Services.dirsvc.get("GreBinD", Ci.nsIFile);
- exe.append(exeName);
-
- let params = pings.flatMap(ping => [ping.url, ping.path]);
- let process = Cc["@mozilla.org/process/util;1"].createInstance(
- Ci.nsIProcess
- );
- process.init(exe);
- process.startHidden = true;
- process.noShell = true;
- process.runAsync(params, params.length, observer);
+ throw Components.Exception("", Cr.NS_ERROR_NOT_IMPLEMENTED);
},
};
diff --git a/toolkit/components/telemetry/moz.build b/toolkit/components/telemetry/moz.build
index 2a23b344dde1..0766635b2017 100644
--- a/toolkit/components/telemetry/moz.build
+++ b/toolkit/components/telemetry/moz.build
@@ -8,10 +8,6 @@ include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
-DIRS = [
- 'pingsender',
-]
-
DEFINES['MOZ_APP_VERSION'] = '"%s"' % CONFIG['MOZ_APP_VERSION']
LOCAL_INCLUDES += [
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 16940: After update, load local change notes.
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit c5fef0b9a5baee020c27ba409db3e58997896651
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Wed Nov 25 11:36:20 2015 -0500
Bug 16940: After update, load local change notes.
Add an about:tbupdate page that displays the first section from
TorBrowser/Docs/ChangeLog.txt and includes a link to the remote
post-update page (typically our blog entry for the release).
Always load about:tbupdate in a content process, but implement the
code that reads the file system (changelog) in the chrome process
for compatibility with future sandboxing efforts.
Also fix bug 29440. Now about:tbupdate is styled as a fairly simple
changelog page that is designed to be displayed via a link that is on
about:tor.
---
browser/actors/AboutTBUpdateChild.jsm | 12 +++
browser/actors/AboutTBUpdateParent.jsm | 120 +++++++++++++++++++++
browser/actors/moz.build | 6 ++
.../base/content/abouttbupdate/aboutTBUpdate.css | 74 +++++++++++++
.../base/content/abouttbupdate/aboutTBUpdate.js | 27 +++++
.../base/content/abouttbupdate/aboutTBUpdate.xhtml | 39 +++++++
browser/base/content/browser-siteIdentity.js | 2 +-
browser/base/content/browser.js | 4 +
browser/base/jar.mn | 5 +
browser/components/BrowserContentHandler.jsm | 55 +++++++---
browser/components/BrowserGlue.jsm | 15 +++
browser/components/about/AboutRedirector.cpp | 6 ++
browser/components/about/components.conf | 3 +
browser/components/moz.build | 5 +-
.../locales/en-US/chrome/browser/aboutTBUpdate.dtd | 8 ++
browser/locales/jar.mn | 3 +
toolkit/modules/RemotePageAccessManager.jsm | 5 +
17 files changed, 373 insertions(+), 16 deletions(-)
diff --git a/browser/actors/AboutTBUpdateChild.jsm b/browser/actors/AboutTBUpdateChild.jsm
new file mode 100644
index 000000000000..4670da19b3db
--- /dev/null
+++ b/browser/actors/AboutTBUpdateChild.jsm
@@ -0,0 +1,12 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+// See LICENSE for licensing information.
+//
+// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
+
+var EXPORTED_SYMBOLS = ["AboutTBUpdateChild"];
+
+const { RemotePageChild } = ChromeUtils.import(
+ "resource://gre/actors/RemotePageChild.jsm"
+);
+
+class AboutTBUpdateChild extends RemotePageChild {}
diff --git a/browser/actors/AboutTBUpdateParent.jsm b/browser/actors/AboutTBUpdateParent.jsm
new file mode 100644
index 000000000000..56a10394565a
--- /dev/null
+++ b/browser/actors/AboutTBUpdateParent.jsm
@@ -0,0 +1,120 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+// See LICENSE for licensing information.
+//
+// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
+
+"use strict";
+
+this.EXPORTED_SYMBOLS = ["AboutTBUpdateParent"];
+
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { NetUtil } = ChromeUtils.import("resource://gre/modules/NetUtil.jsm");
+const { AppConstants } = ChromeUtils.import(
+ "resource://gre/modules/AppConstants.jsm"
+);
+
+const kRequestUpdateMessageName = "FetchUpdateData";
+
+/**
+ * This code provides services to the about:tbupdate page. Whenever
+ * about:tbupdate needs to do something chrome-privileged, it sends a
+ * message that's handled here. It is modeled after Mozilla's about:home
+ * implementation.
+ */
+class AboutTBUpdateParent extends JSWindowActorParent {
+ receiveMessage(aMessage) {
+ if (aMessage.name == kRequestUpdateMessageName) {
+ return this.releaseNoteInfo;
+ }
+ return undefined;
+ }
+
+ get moreInfoURL() {
+ try {
+ return Services.prefs.getCharPref("torbrowser.post_update.url");
+ } catch (e) {}
+
+ // Use the default URL as a fallback.
+ return Services.urlFormatter.formatURLPref("startup.homepage_override_url");
+ }
+
+ // Read the text from the beginning of the changelog file that is located
+ // at TorBrowser/Docs/ChangeLog.txt and return an object that contains
+ // the following properties:
+ // version e.g., Tor Browser 8.5
+ // releaseDate e.g., March 31 2019
+ // releaseNotes details of changes (lines 2 - end of ChangeLog.txt)
+ // We attempt to parse the first line of ChangeLog.txt to extract the
+ // version and releaseDate. If parsing fails, we return the entire first
+ // line in version and omit releaseDate.
+ //
+ // On Mac OS, when building with --enable-tor-browser-data-outside-app-dir
+ // to support Gatekeeper signing, the ChangeLog.txt file is located in
+ // TorBrowser.app/Contents/Resources/TorBrowser/Docs/.
+ get releaseNoteInfo() {
+ let info = { moreInfoURL: this.moreInfoURL };
+
+ try {
+ let f;
+ if (AppConstants.TOR_BROWSER_DATA_OUTSIDE_APP_DIR) {
+ // "XREExeF".parent is the directory that contains firefox, i.e.,
+ // Browser/ or, on Mac OS, TorBrowser.app/Contents/MacOS/.
+ f = Services.dirsvc.get("XREExeF", Ci.nsIFile).parent;
+ if (AppConstants.platform === "macosx") {
+ f = f.parent;
+ f.append("Resources");
+ }
+ f.append("TorBrowser");
+ } else {
+ // "DefProfRt" is .../TorBrowser/Data/Browser
+ f = Services.dirsvc.get("DefProfRt", Ci.nsIFile);
+ f = f.parent.parent; // Remove "Data/Browser"
+ }
+
+ f.append("Docs");
+ f.append("ChangeLog.txt");
+
+ let fs = Cc["@mozilla.org/network/file-input-stream;1"].createInstance(
+ Ci.nsIFileInputStream
+ );
+ fs.init(f, -1, 0, 0);
+ let s = NetUtil.readInputStreamToString(fs, fs.available());
+ fs.close();
+
+ // Truncate at the first empty line.
+ s = s.replace(/[\r\n][\r\n][\s\S]*$/m, "");
+
+ // Split into first line (version plus releaseDate) and
+ // remainder (releaseNotes).
+ // This first match() uses multiline mode with two capture groups:
+ // first line: (.*$)
+ // remaining lines: ([\s\S]+)
+ // [\s\S] matches all characters including end of line. This trick
+ // is needed because when using JavaScript regex in multiline mode,
+ // . does not match an end of line character.
+ let matchArray = s.match(/(.*$)\s*([\s\S]+)/m);
+ if (matchArray && matchArray.length == 3) {
+ info.releaseNotes = matchArray[2];
+ let line1 = matchArray[1];
+ // Extract the version and releaseDate. The first line looks like:
+ // Tor Browser 8.5 -- May 1 2019
+ // The regex uses two capture groups:
+ // text that does not include a hyphen: (^[^-]*)
+ // remaining text: (.*$)
+ // In between we match optional whitespace, one or more hyphens, and
+ // optional whitespace by using: \s*-+\s*
+ matchArray = line1.match(/(^[^-]*)\s*-+\s*(.*$)/);
+ if (matchArray && matchArray.length == 3) {
+ info.version = matchArray[1];
+ info.releaseDate = matchArray[2];
+ } else {
+ info.version = line1; // Match failed: return entire line in version.
+ }
+ } else {
+ info.releaseNotes = s; // Only one line: use as releaseNotes.
+ }
+ } catch (e) {}
+
+ return info;
+ }
+}
diff --git a/browser/actors/moz.build b/browser/actors/moz.build
index f00621df222e..e1ef9b4c9806 100644
--- a/browser/actors/moz.build
+++ b/browser/actors/moz.build
@@ -87,3 +87,9 @@ FINAL_TARGET_FILES.actors += [
'WebRTCChild.jsm',
'WebRTCParent.jsm',
]
+
+if CONFIG['TOR_BROWSER_UPDATE']:
+ FINAL_TARGET_FILES.actors += [
+ 'AboutTBUpdateChild.jsm',
+ 'AboutTBUpdateParent.jsm',
+ ]
diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.css b/browser/base/content/abouttbupdate/aboutTBUpdate.css
new file mode 100644
index 000000000000..7c1a34b77f17
--- /dev/null
+++ b/browser/base/content/abouttbupdate/aboutTBUpdate.css
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2019, The Tor Project, Inc.
+ * See LICENSE for licensing information.
+ *
+ * vim: set sw=2 sts=2 ts=8 et syntax=css:
+ */
+
+:root {
+ --abouttor-text-color: white;
+ --abouttor-bg-toron-color: #420C5D;
+}
+
+body {
+ font-family: Helvetica, Arial, sans-serif;
+ color: var(--abouttor-text-color);
+ background-color: var(--abouttor-bg-toron-color);
+ background-attachment: fixed;
+ background-size: 100% 100%;
+}
+
+a {
+ color: var(--abouttor-text-color);
+}
+
+.two-column-grid {
+ display: inline-grid;
+ grid-template-columns: auto auto;
+ grid-column-gap: 50px;
+ margin: 10px 0px 0px 50px;
+}
+
+.two-column-grid div {
+ margin-top: 40px;
+ align-self: baseline; /* Align baseline of text across the row. */
+}
+
+.label-column {
+ font-size: 14px;
+ font-weight: 400;
+}
+
+/*
+ * Use a reduced top margin to bring the row that contains the
+ * "visit our website" link closer to the row that precedes it. This
+ * looks better because the "visit our website" row does not have a
+ * label in the left column.
+ */
+div.more-info-row {
+ margin-top: 5px;
+ font-size: 14px;
+}
+
+#version-content {
+ font-size: 50px;
+ font-weight: 300;
+}
+
+body:not([havereleasedate]) .release-date-cell {
+ display: none;
+}
+
+#releasedate-content {
+ font-size: 17px;
+}
+
+#releasenotes-label {
+ align-self: start; /* Anchor "Release Notes" label at the top. */
+}
+
+#releasenotes-content {
+ font-family: monospace;
+ font-size: 15px;
+ white-space: pre;
+}
diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.js b/browser/base/content/abouttbupdate/aboutTBUpdate.js
new file mode 100644
index 000000000000..ec070e2cb131
--- /dev/null
+++ b/browser/base/content/abouttbupdate/aboutTBUpdate.js
@@ -0,0 +1,27 @@
+// Copyright (c) 2020, The Tor Project, Inc.
+// See LICENSE for licensing information.
+//
+// vim: set sw=2 sts=2 ts=8 et syntax=javascript:
+
+/* eslint-env mozilla/frame-script */
+
+// aData may contain the following string properties:
+// version
+// releaseDate
+// moreInfoURL
+// releaseNotes
+function onUpdate(aData) {
+ document.getElementById("version-content").textContent = aData.version;
+ if (aData.releaseDate) {
+ document.body.setAttribute("havereleasedate", "true");
+ document.getElementById("releasedate-content").textContent =
+ aData.releaseDate;
+ }
+ if (aData.moreInfoURL) {
+ document.getElementById("infolink").setAttribute("href", aData.moreInfoURL);
+ }
+ document.getElementById("releasenotes-content").textContent =
+ aData.releaseNotes;
+}
+
+RPMSendQuery("FetchUpdateData").then(onUpdate);
diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml b/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml
new file mode 100644
index 000000000000..8489cfef5083
--- /dev/null
+++ b/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE html [
+ <!ENTITY % htmlDTD
+ PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "DTD/xhtml1-strict.dtd">
+ %htmlDTD;
+ <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
+ %globalDTD;
+ <!ENTITY % tbUpdateDTD SYSTEM "chrome://browser/locale/aboutTBUpdate.dtd">
+ %tbUpdateDTD;
+]>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+ <meta http-equiv="Content-Security-Policy" content="default-src chrome:; object-src 'none'" />
+ <title>&aboutTBUpdate.changelogTitle;</title>
+ <link rel="stylesheet" type="text/css"
+ href="chrome://browser/content/abouttbupdate/aboutTBUpdate.css"/>
+ <script src="chrome://browser/content/abouttbupdate/aboutTBUpdate.js"
+ type="text/javascript"/>
+</head>
+<body dir="&locale.dir;">
+<div class="two-column-grid">
+ <div class="label-column">&aboutTBUpdate.version;</div>
+ <div id="version-content"/>
+
+ <div class="label-column release-date-cell">&aboutTBUpdate.releaseDate;</div>
+ <div id="releasedate-content" class="release-date-cell"/>
+
+ <div class="more-info-row"/>
+ <div class="more-info-row">&aboutTBUpdate.linkPrefix;<a id="infolink">&aboutTBUpdate.linkLabel;</a>&aboutTBUpdate.linkSuffix;</div>
+
+ <div id="releasenotes-label"
+ class="label-column">&aboutTBUpdate.releaseNotes;</div>
+ <div id="releasenotes-content"></div>
+</div>
+</body>
+</html>
diff --git a/browser/base/content/browser-siteIdentity.js b/browser/base/content/browser-siteIdentity.js
index f012228e57dd..94f959c99e5d 100644
--- a/browser/base/content/browser-siteIdentity.js
+++ b/browser/base/content/browser-siteIdentity.js
@@ -57,7 +57,7 @@ var gIdentityHandler = {
* RegExp used to decide if an about url should be shown as being part of
* the browser UI.
*/
- _secureInternalPages: /^(?:accounts|addons|cache|certificate|config|crashes|downloads|license|logins|preferences|protections|rights|sessionrestore|support|welcomeback|ion)(?:[?#]|$)/i,
+ _secureInternalPages: (AppConstants.TOR_BROWSER_UPDATE ? /^(?:accounts|addons|cache|certificate|config|crashes|downloads|license|logins|preferences|protections|rights|sessionrestore|support|welcomeback|ion|tor|tbupdate)(?:[?#]|$)/i : /^(?:accounts|addons|cache|certificate|config|crashes|downloads|license|logins|preferences|protections|rights|sessionrestore|support|welcomeback|ion|tor)(?:[?#]|$)/i),
/**
* Whether the established HTTPS connection is considered "broken".
diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js
index 2d82ed7b58a2..da1d1d869209 100644
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -625,6 +625,10 @@ var gInitialPages = [
"about:newinstall",
];
+if (AppConstants.TOR_BROWSER_UPDATE) {
+ gInitialPages.push("about:tbupdate");
+}
+
function isInitialPage(url) {
if (!(url instanceof Ci.nsIURI)) {
try {
diff --git a/browser/base/jar.mn b/browser/base/jar.mn
index ef8d5542bc06..379b2f88527b 100644
--- a/browser/base/jar.mn
+++ b/browser/base/jar.mn
@@ -32,6 +32,11 @@ browser.jar:
content/browser/aboutTabCrashed.css (content/aboutTabCrashed.css)
content/browser/aboutTabCrashed.js (content/aboutTabCrashed.js)
content/browser/aboutTabCrashed.xhtml (content/aboutTabCrashed.xhtml)
+#ifdef TOR_BROWSER_UPDATE
+ content/browser/abouttbupdate/aboutTBUpdate.xhtml (content/abouttbupdate/aboutTBUpdate.xhtml)
+ content/browser/abouttbupdate/aboutTBUpdate.js (content/abouttbupdate/aboutTBUpdate.js)
+ content/browser/abouttbupdate/aboutTBUpdate.css (content/abouttbupdate/aboutTBUpdate.css)
+#endif
* content/browser/browser.css (content/browser.css)
content/browser/browser.js (content/browser.js)
* content/browser/browser.xhtml (content/browser.xhtml)
diff --git a/browser/components/BrowserContentHandler.jsm b/browser/components/BrowserContentHandler.jsm
index 9b74c1e7e404..4d0b607fd10f 100644
--- a/browser/components/BrowserContentHandler.jsm
+++ b/browser/components/BrowserContentHandler.jsm
@@ -650,6 +650,23 @@ nsBrowserContentHandler.prototype = {
}
}
+ // Retrieve the home page early so we can compare it against about:tor
+ // to decide whether or not we need an override page (second tab) after
+ // an update was applied.
+ var startPage = "";
+ try {
+ var choice = prefb.getIntPref("browser.startup.page");
+ if (choice == 1 || choice == 3) {
+ startPage = HomePage.get();
+ }
+ } catch (e) {
+ Cu.reportError(e);
+ }
+
+ if (startPage == "about:blank") {
+ startPage = "";
+ }
+
var override;
var overridePage = "";
var additionalPage = "";
@@ -701,6 +718,16 @@ nsBrowserContentHandler.prototype = {
// into account because that requires waiting for the session file
// to be read. If a crash occurs after updating, before restarting,
// we may open the startPage in addition to restoring the session.
+ //
+ // Tor Browser: Instead of opening the post-update "override page"
+ // directly, we ensure that about:tor will be opened in a special
+ // mode that notifies the user that their browser was updated.
+ // The about:tor page will provide a link to the override page
+ // where the user can learn more about the update, as well as a
+ // link to the Tor Browser changelog page (about:tbupdate). The
+ // override page URL comes from the openURL attribute within the
+ // updates.xml file or, if no showURL action is present, from the
+ // startup.homepage_override_url pref.
willRestoreSession = SessionStartup.isAutomaticRestoreEnabled();
overridePage = Services.urlFormatter.formatURLPref(
@@ -720,6 +747,20 @@ nsBrowserContentHandler.prototype = {
overridePage = overridePage.replace("%OLD_VERSION%", old_mstone);
overridePage = overridePage.replace("%OLD_TOR_BROWSER_VERSION%",
old_tbversion);
+#ifdef TOR_BROWSER_UPDATE
+ if (overridePage)
+ {
+ prefb.setCharPref("torbrowser.post_update.url", overridePage);
+ prefb.setBoolPref("torbrowser.post_update.shouldNotify", true);
+ // If the user's homepage is about:tor, we will inform them
+ // about the update on that page; otherwise, we arrange to
+ // open about:tor in a secondary tab.
+ if (startPage === "about:tor")
+ overridePage = "";
+ else
+ overridePage = "about:tor";
+ }
+#endif
break;
case OVERRIDE_NEW_BUILD_ID:
if (UpdateManager.readyUpdate) {
@@ -792,20 +833,6 @@ nsBrowserContentHandler.prototype = {
}
}
- var startPage = "";
- try {
- var choice = prefb.getIntPref("browser.startup.page");
- if (choice == 1 || choice == 3) {
- startPage = HomePage.get();
- }
- } catch (e) {
- Cu.reportError(e);
- }
-
- if (startPage == "about:blank") {
- startPage = "";
- }
-
let skipStartPage =
(override == OVERRIDE_NEW_PROFILE ||
override == OVERRIDE_ALTERNATE_PROFILE) &&
diff --git a/browser/components/BrowserGlue.jsm b/browser/components/BrowserGlue.jsm
index e75a744eca3a..bca89f2297c3 100644
--- a/browser/components/BrowserGlue.jsm
+++ b/browser/components/BrowserGlue.jsm
@@ -674,6 +674,21 @@ let JSWINDOWACTORS = {
},
};
+if (AppConstants.TOR_BROWSER_UPDATE) {
+ JSWINDOWACTORS["AboutTBUpdate"] = {
+ parent: {
+ moduleURI: "resource:///actors/AboutTBUpdateParent.jsm",
+ },
+ child: {
+ moduleURI: "resource:///actors/AboutTBUpdateChild.jsm",
+ events: {
+ DOMWindowCreated: { capture: true },
+ },
+ },
+ matches: ["about:tbupdate"],
+ };
+}
+
(function earlyBlankFirstPaint() {
if (
AppConstants.platform == "macosx" ||
diff --git a/browser/components/about/AboutRedirector.cpp b/browser/components/about/AboutRedirector.cpp
index a1e1c71b6dc6..b99d8aff64e9 100644
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -120,6 +120,12 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::URI_CAN_LOAD_IN_PRIVILEGEDABOUT_PROCESS},
{"ion", "chrome://browser/content/ion.html",
nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+#ifdef TOR_BROWSER_UPDATE
+ {"tbupdate", "chrome://browser/content/abouttbupdate/aboutTBUpdate.xhtml",
+ nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
+ nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
+ nsIAboutModule::HIDE_FROM_ABOUTABOUT},
+#endif
};
static nsAutoCString GetAboutModuleName(nsIURI* aURI) {
diff --git a/browser/components/about/components.conf b/browser/components/about/components.conf
index 42011d509481..56731d70c386 100644
--- a/browser/components/about/components.conf
+++ b/browser/components/about/components.conf
@@ -32,6 +32,9 @@ pages = [
'welcomeback',
]
+if defined('TOR_BROWSER_UPDATE'):
+ pages.append('tbupdate')
+
Classes = [
{
'cid': '{7e4bb6ad-2fc4-4dc6-89ef-23e8e5ccf980}',
diff --git a/browser/components/moz.build b/browser/components/moz.build
index d9906d053f6b..0bd5fd264633 100644
--- a/browser/components/moz.build
+++ b/browser/components/moz.build
@@ -89,11 +89,14 @@ EXTRA_COMPONENTS += [
]
EXTRA_JS_MODULES += [
- 'BrowserContentHandler.jsm',
'BrowserGlue.jsm',
'distribution.js',
]
+EXTRA_PP_JS_MODULES += [
+ 'BrowserContentHandler.jsm',
+]
+
BROWSER_CHROME_MANIFESTS += [
'safebrowsing/content/test/browser.ini',
'tests/browser/browser.ini',
diff --git a/browser/locales/en-US/chrome/browser/aboutTBUpdate.dtd b/browser/locales/en-US/chrome/browser/aboutTBUpdate.dtd
new file mode 100644
index 000000000000..2d1e59b40eaf
--- /dev/null
+++ b/browser/locales/en-US/chrome/browser/aboutTBUpdate.dtd
@@ -0,0 +1,8 @@
+<!ENTITY aboutTBUpdate.changelogTitle "Tor Browser Changelog">
+<!ENTITY aboutTBUpdate.updated "Tor Browser has been updated.">
+<!ENTITY aboutTBUpdate.linkPrefix "For the most up-to-date information about this release, ">
+<!ENTITY aboutTBUpdate.linkLabel "visit our website">
+<!ENTITY aboutTBUpdate.linkSuffix ".">
+<!ENTITY aboutTBUpdate.version "Version">
+<!ENTITY aboutTBUpdate.releaseDate "Release Date">
+<!ENTITY aboutTBUpdate.releaseNotes "Release Notes">
diff --git a/browser/locales/jar.mn b/browser/locales/jar.mn
index 2268e99c1b5e..2221bb960381 100644
--- a/browser/locales/jar.mn
+++ b/browser/locales/jar.mn
@@ -20,6 +20,9 @@
locale/browser/accounts.properties (%chrome/browser/accounts.properties)
locale/browser/app-extension-fields.properties (%chrome/browser/app-extension-fields.properties)
+#ifdef TOR_BROWSER_UPDATE
+ locale/browser/aboutTBUpdate.dtd (%chrome/browser/aboutTBUpdate.dtd)
+#endif
locale/browser/browser.dtd (%chrome/browser/browser.dtd)
locale/browser/baseMenuOverlay.dtd (%chrome/browser/baseMenuOverlay.dtd)
locale/browser/browser.properties (%chrome/browser/browser.properties)
diff --git a/toolkit/modules/RemotePageAccessManager.jsm b/toolkit/modules/RemotePageAccessManager.jsm
index c9983151407a..d95f127497c4 100644
--- a/toolkit/modules/RemotePageAccessManager.jsm
+++ b/toolkit/modules/RemotePageAccessManager.jsm
@@ -202,6 +202,11 @@ let RemotePageAccessManager = {
RPMAddMessageListener: ["*"],
RPMRemoveMessageListener: ["*"],
},
+ "about:tbupdate": {
+ RPMSendQuery: [
+ "FetchUpdateData",
+ ],
+ },
},
/**
1
0

[tor-browser/tor-browser-83.0-10.5-1] Bug 13379: Sign our MAR files.
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit 319fe512d871ac5e1f31d6c3c11cc20ee6361b3e
Author: Kathy Brade <brade(a)pearlcrescent.com>
Date: Wed Dec 17 16:37:11 2014 -0500
Bug 13379: Sign our MAR files.
Configure with --enable-verify-mar (when updating, require a valid
signature on the MAR file before it is applied).
Use the Tor Browser version instead of the Firefox version inside the
MAR file info block (necessary to prevent downgrade attacks).
Use NSS on all platforms for checking MAR signatures (instead of using
OS-native APIs, which Mozilla does on Mac OS and Windows). So that the
NSS and NSPR libraries the updater depends on can be found at runtime,
we add the firefox directory to the shared library search path on macOS.
On Linux, rpath is used by Mozilla to solve that problem, but that
approach won't work on macOS because the updater executable is copied
during the update process to a location that is under TorBrowser-Data,
and the location of TorBrowser-Data varies.
Also includes the fix for bug 18900.
---
.mozconfig | 1 +
.mozconfig-asan | 1 +
.mozconfig-mac | 1 +
.mozconfig-mingw | 1 +
modules/libmar/tool/mar.c | 6 +--
modules/libmar/tool/moz.build | 12 ++++--
modules/libmar/verify/moz.build | 14 +++---
.../mozapps/update/updater/updater-common.build | 24 +++++++++--
toolkit/mozapps/update/updater/updater.cpp | 25 +++++++----
toolkit/xre/moz.build | 3 ++
toolkit/xre/nsUpdateDriver.cpp | 50 ++++++++++++++++++++++
11 files changed, 113 insertions(+), 25 deletions(-)
diff --git a/.mozconfig b/.mozconfig
index 24efaea57b0b..d71c858844e3 100755
--- a/.mozconfig
+++ b/.mozconfig
@@ -36,3 +36,4 @@ ac_add_options MOZ_TELEMETRY_REPORTING=
ac_add_options --disable-tor-launcher
ac_add_options --with-tor-browser-version=dev-build
ac_add_options --disable-tor-browser-update
+ac_add_options --enable-verify-mar
diff --git a/.mozconfig-asan b/.mozconfig-asan
index 13232e054d45..ca05fb12eedb 100644
--- a/.mozconfig-asan
+++ b/.mozconfig-asan
@@ -28,6 +28,7 @@ ac_add_options --enable-official-branding
ac_add_options --enable-default-toolkit=cairo-gtk3
ac_add_options --enable-tor-browser-update
+ac_add_options --enable-verify-mar
ac_add_options --disable-strip
ac_add_options --disable-install-strip
diff --git a/.mozconfig-mac b/.mozconfig-mac
index 1f89cab30bbc..9be7751f8241 100644
--- a/.mozconfig-mac
+++ b/.mozconfig-mac
@@ -42,6 +42,7 @@ ac_add_options --disable-debug
ac_add_options --enable-tor-browser-data-outside-app-dir
ac_add_options --enable-tor-browser-update
+ac_add_options --enable-verify-mar
ac_add_options --disable-crashreporter
ac_add_options --disable-webrtc
diff --git a/.mozconfig-mingw b/.mozconfig-mingw
index 4fb050308060..29c58d8fdab2 100644
--- a/.mozconfig-mingw
+++ b/.mozconfig-mingw
@@ -14,6 +14,7 @@ ac_add_options --enable-strip
ac_add_options --enable-official-branding
ac_add_options --enable-tor-browser-update
+ac_add_options --enable-verify-mar
ac_add_options --disable-bits-download
# Let's make sure no preference is enabling either Adobe's or Google's CDM.
diff --git a/modules/libmar/tool/mar.c b/modules/libmar/tool/mar.c
index 0bf2cb4bd1d4..ea2b79924914 100644
--- a/modules/libmar/tool/mar.c
+++ b/modules/libmar/tool/mar.c
@@ -65,7 +65,7 @@ static void print_usage() {
"signed_input_archive.mar base_64_encoded_signature_file "
"changed_signed_output.mar\n");
printf("(i) is the index of the certificate to extract\n");
-# if defined(XP_MACOSX) || (defined(XP_WIN) && !defined(MAR_NSS))
+# if (defined(XP_MACOSX) || defined(XP_WIN)) && !defined(MAR_NSS)
printf("Verify a MAR file:\n");
printf(" mar [-C workingDir] -D DERFilePath -v signed_archive.mar\n");
printf(
@@ -149,7 +149,7 @@ int main(int argc, char** argv) {
memset((void*)certBuffers, 0, sizeof(certBuffers));
#endif
#if !defined(NO_SIGN_VERIFY) && \
- ((!defined(MAR_NSS) && defined(XP_WIN)) || defined(XP_MACOSX))
+ (!defined(MAR_NSS) && (defined(XP_WIN) || defined(XP_MACOSX)))
memset(DERFilePaths, 0, sizeof(DERFilePaths));
memset(fileSizes, 0, sizeof(fileSizes));
#endif
@@ -181,7 +181,7 @@ int main(int argc, char** argv) {
argc -= 2;
}
#if !defined(NO_SIGN_VERIFY)
-# if (!defined(MAR_NSS) && defined(XP_WIN)) || defined(XP_MACOSX)
+# if (!defined(MAR_NSS) && (defined(XP_WIN) || defined(XP_MACOSX)))
/* -D DERFilePath, also matches -D[index] DERFilePath
We allow an index for verifying to be symmetric
with the import and export command line arguments. */
diff --git a/modules/libmar/tool/moz.build b/modules/libmar/tool/moz.build
index 7c303422fb3b..f80e0c932f13 100644
--- a/modules/libmar/tool/moz.build
+++ b/modules/libmar/tool/moz.build
@@ -43,15 +43,21 @@ if CONFIG['MOZ_BUILD_APP'] != 'tools/update-packaging':
'verifymar',
]
+ if CONFIG['TOR_BROWSER_UPDATE']:
+ DEFINES['MAR_NSS'] = True
+
if CONFIG['OS_ARCH'] == 'WINNT':
USE_STATIC_LIBS = True
OS_LIBS += [
'ws2_32',
- 'crypt32',
- 'advapi32',
]
- elif CONFIG['OS_ARCH'] == 'Darwin':
+ if not CONFIG['TOR_BROWSER_UPDATE']:
+ OS_LIBS += [
+ 'crypt32',
+ 'advapi32',
+ ]
+ elif CONFIG['OS_ARCH'] == 'Darwin' and not CONFIG['TOR_BROWSER_UPDATE']:
OS_LIBS += [
'-framework Security',
]
diff --git a/modules/libmar/verify/moz.build b/modules/libmar/verify/moz.build
index 426b413e4272..a7c37104adb5 100644
--- a/modules/libmar/verify/moz.build
+++ b/modules/libmar/verify/moz.build
@@ -16,15 +16,12 @@ FORCE_STATIC_LIB = True
if CONFIG['OS_ARCH'] == 'WINNT':
USE_STATIC_LIBS = True
elif CONFIG['OS_ARCH'] == 'Darwin':
- UNIFIED_SOURCES += [
- 'MacVerifyCrypto.cpp',
- ]
- OS_LIBS += [
- '-framework Security',
+ USE_LIBS += [
+ 'nspr',
+ 'nss',
+ 'signmar',
]
else:
- DEFINES['MAR_NSS'] = True
- LOCAL_INCLUDES += ['../sign']
USE_LIBS += [
'nspr',
'nss',
@@ -38,6 +35,9 @@ else:
'-Wl,-rpath=\\$$ORIGIN',
]
+DEFINES['MAR_NSS'] = True
+LOCAL_INCLUDES += ['../sign']
+
LOCAL_INCLUDES += [
'../src',
]
diff --git a/toolkit/mozapps/update/updater/updater-common.build b/toolkit/mozapps/update/updater/updater-common.build
index 5898e92d465d..9f8365df8ade 100644
--- a/toolkit/mozapps/update/updater/updater-common.build
+++ b/toolkit/mozapps/update/updater/updater-common.build
@@ -4,6 +4,10 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+DEFINES['MAR_NSS'] = True
+
+link_with_nss = DEFINES['MAR_NSS'] or (CONFIG['OS_ARCH'] == 'Linux' and CONFIG['MOZ_VERIFY_MAR_SIGNATURE'])
+
srcs = [
'archivereader.cpp',
'updater.cpp',
@@ -36,10 +40,14 @@ if CONFIG['OS_ARCH'] == 'WINNT':
'ws2_32',
'shell32',
'shlwapi',
- 'crypt32',
- 'advapi32',
]
+ if not link_with_nss:
+ OS_LIBS += [
+ 'crypt32',
+ 'advapi32',
+ ]
+
USE_LIBS += [
'bspatch',
'mar',
@@ -47,6 +55,13 @@ USE_LIBS += [
'xz-embedded',
]
+if link_with_nss:
+ USE_LIBS += [
+ 'nspr',
+ 'nss',
+ 'signmar',
+ ]
+
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
have_progressui = 1
srcs += [
@@ -61,9 +76,12 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
]
OS_LIBS += [
'-framework Cocoa',
- '-framework Security',
'-framework SystemConfiguration',
]
+ if not link_with_nss:
+ OS_LIBS += [
+ '-framework Security',
+ ]
UNIFIED_SOURCES += [
'/toolkit/xre/updaterfileutils_osx.mm',
]
diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp
index 226354d5e753..d6f1f6c568bc 100644
--- a/toolkit/mozapps/update/updater/updater.cpp
+++ b/toolkit/mozapps/update/updater/updater.cpp
@@ -106,9 +106,11 @@ struct UpdateServerThreadArgs {
# define USE_EXECV
#endif
-#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
-# include "nss.h"
-# include "prerror.h"
+#if defined(MOZ_VERIFY_MAR_SIGNATURE)
+# if defined(MAR_NSS) || (!defined(XP_WIN) && !defined(XP_MACOSX))
+# include "nss.h"
+# include "prerror.h"
+# endif
#endif
#include "crctable.h"
@@ -2721,8 +2723,13 @@ static void UpdateThreadFunc(void* param) {
if (ReadMARChannelIDs(updateSettingsPath, &MARStrings) != OK) {
rv = UPDATE_SETTINGS_FILE_CHANNEL;
} else {
+# ifdef TOR_BROWSER_UPDATE
+ const char* appVersion = TOR_BROWSER_VERSION_QUOTED;
+# else
+ const char* appVersion = MOZ_APP_VERSION;
+# endif
rv = gArchiveReader.VerifyProductInformation(
- MARStrings.MARChannelID.get(), MOZ_APP_VERSION);
+ MARStrings.MARChannelID.get(), appVersion);
}
}
}
@@ -2923,11 +2930,10 @@ int NS_main(int argc, NS_tchar** argv) {
}
#endif
-#if defined(MOZ_VERIFY_MAR_SIGNATURE) && !defined(XP_WIN) && !defined(XP_MACOSX)
- // On Windows and Mac we rely on native APIs to do verifications so we don't
- // need to initialize NSS at all there.
- // Otherwise, minimize the amount of NSS we depend on by avoiding all the NSS
- // databases.
+#if defined(MOZ_VERIFY_MAR_SIGNATURE)
+# if defined(MAR_NSS) || (!defined(XP_WIN) && !defined(XP_MACOSX))
+ // If using NSS for signature verification, initialize NSS but minimize
+ // the portion we depend on by avoiding all of the NSS databases.
if (NSS_NoDB_Init(nullptr) != SECSuccess) {
PRErrorCode error = PR_GetError();
fprintf(stderr, "Could not initialize NSS: %s (%d)", PR_ErrorToName(error),
@@ -2935,6 +2941,7 @@ int NS_main(int argc, NS_tchar** argv) {
_exit(1);
}
#endif
+#endif
#ifdef XP_MACOSX
if (!isElevated) {
diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build
index 2ee6ef4b1d56..717b04937f91 100644
--- a/toolkit/xre/moz.build
+++ b/toolkit/xre/moz.build
@@ -217,6 +217,9 @@ for var in ('APP_VERSION', 'APP_ID'):
if CONFIG['MOZ_BUILD_APP'] == 'browser':
DEFINES['MOZ_BUILD_APP_IS_BROWSER'] = True
+if CONFIG['TOR_BROWSER_UPDATE']:
+ DEFINES['MAR_NSS'] = True
+
LOCAL_INCLUDES += [
'../../other-licenses/nsis/Contrib/CityHash/cityhash',
'../components/find',
diff --git a/toolkit/xre/nsUpdateDriver.cpp b/toolkit/xre/nsUpdateDriver.cpp
index 9e128b0b04c7..8df2d54195f7 100644
--- a/toolkit/xre/nsUpdateDriver.cpp
+++ b/toolkit/xre/nsUpdateDriver.cpp
@@ -360,6 +360,42 @@ static nsresult GetUpdateDirFromAppDir(nsIFile* aAppDir, nsIFile** aResult) {
# endif
#endif
+#if defined(TOR_BROWSER_UPDATE) && defined(MOZ_VERIFY_MAR_SIGNATURE) && \
+ defined(MAR_NSS) && defined(XP_MACOSX)
+/**
+ * Ideally we would save and restore the original library path value after
+ * the updater finishes its work (and before firefox is re-launched).
+ * Doing so would avoid potential problems like the following bug:
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=1434033
+ */
+/**
+ * Appends the specified path to the library path.
+ * This is used so that the updater can find libnss3.dylib and other
+ * shared libs.
+ *
+ * @param pathToAppend A new library path to prepend to the dynamic linker's
+ * search path.
+ */
+# include "prprf.h"
+# define PATH_SEPARATOR ":"
+# define LD_LIBRARY_PATH_ENVVAR_NAME "DYLD_LIBRARY_PATH"
+static void AppendToLibPath(const char* pathToAppend) {
+ char* pathValue = getenv(LD_LIBRARY_PATH_ENVVAR_NAME);
+ if (nullptr == pathValue || '\0' == *pathValue) {
+ // Leak the string because that is required by PR_SetEnv.
+ char* s =
+ Smprintf("%s=%s", LD_LIBRARY_PATH_ENVVAR_NAME, pathToAppend).release();
+ PR_SetEnv(s);
+ } else {
+ // Leak the string because that is required by PR_SetEnv.
+ char* s = Smprintf("%s=%s" PATH_SEPARATOR "%s", LD_LIBRARY_PATH_ENVVAR_NAME,
+ pathToAppend, pathValue)
+ .release();
+ PR_SetEnv(s);
+ }
+}
+#endif
+
/**
* Applies, switches, or stages an update.
*
@@ -606,6 +642,20 @@ static void ApplyUpdate(nsIFile* greDir, nsIFile* updateDir, nsIFile* appDir,
PR_SetEnv("MOZ_SAFE_MODE_RESTART=1");
}
+#if defined(TOR_BROWSER_UPDATE) && defined(MOZ_VERIFY_MAR_SIGNATURE) && \
+ defined(MAR_NSS) && defined(XP_MACOSX)
+ // On macOS, append the app directory to the shared library search path
+ // so the system can locate the shared libraries that are needed by the
+ // updater, e.g., libnss3.dylib).
+ nsAutoCString appPath;
+ nsresult rv2 = appDir->GetNativePath(appPath);
+ if (NS_SUCCEEDED(rv2)) {
+ AppendToLibPath(appPath.get());
+ } else {
+ LOG(("ApplyUpdate -- appDir->GetNativePath() failed (0x%x)\n", rv2));
+ }
+#endif
+
LOG(("spawning updater process [%s]\n", updaterPath.get()));
#ifdef DEBUG
dump_argv("ApplyUpdate updater", argv, argc);
1
0

[tor-browser/tor-browser-83.0-10.5-1] Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
by sysrqb@torproject.org 13 Nov '20
by sysrqb@torproject.org 13 Nov '20
13 Nov '20
commit f4835de7ca30d9d1c5a91bd6b9dcc3e83e334f4b
Author: Mike Perry <mikeperry-git(a)torproject.org>
Date: Fri May 5 03:41:57 2017 -0700
Omnibox: Add DDG, Startpage, Disconnect, Youtube, Twitter; remove Amazon, eBay, bing
eBay and Amazon don't treat Tor users very well. Accounts often get locked and
payments reversed.
Also:
Bug 16322: Update DuckDuckGo search engine
We are replacing the clearnet URL with an onion service one (thanks to a
patch by a cypherpunk) and are removing the duplicated DDG search
engine. Duplicating DDG happend due to bug 1061736 where Mozilla
included DDG itself into Firefox. Interestingly, this caused breaking
the DDG search if JavaScript is disabled as the Mozilla engine, which
gets loaded earlier, does not use the html version of the search page.
Moreover, the Mozilla engine tracked where the users were searching from
by adding a respective parameter to the search query. We got rid of that
feature as well.
Also:
This fixes bug 20809: the DuckDuckGo team has changed its server-side
code in a way that lets users with JavaScript enabled use the default
landing page while those without JavaScript available get redirected
directly to the non-JS page. We adapt the search engine URLs
accordingly.
Also fixes bug 29798 by making sure we only specify the Google search
engine we actually ship an .xml file for.
Also regression tests.
---
.../search/extensions/ddg-onion/favicon.ico | Bin 0 -> 973 bytes
.../search/extensions/ddg-onion/manifest.json | 26 +++++++++++++
.../components/search/extensions/ddg/favicon.ico | Bin 5430 -> 0 bytes
.../components/search/extensions/ddg/favicon.png | Bin 0 -> 1150 bytes
.../components/search/extensions/ddg/manifest.json | 42 +++------------------
.../extensions/google/_locales/b-1-d/messages.json | 23 -----------
.../extensions/google/_locales/b-1-e/messages.json | 23 -----------
.../extensions/google/_locales/b-d/messages.json | 23 -----------
.../extensions/google/_locales/b-e/messages.json | 23 -----------
.../extensions/google/_locales/en/messages.json | 24 ------------
.../search/extensions/google/manifest.json | 17 ++++-----
.../search/extensions/startpage/favicon.png | Bin 0 -> 1150 bytes
.../search/extensions/startpage/manifest.json | 26 +++++++++++++
.../search/extensions/twitter/favicon.ico | Bin 0 -> 1650 bytes
.../search/extensions/twitter/manifest.json | 26 +++++++++++++
.../extensions/wikipedia/_locales/NN/messages.json | 20 ----------
.../extensions/wikipedia/_locales/NO/messages.json | 20 ----------
.../extensions/wikipedia/_locales/af/messages.json | 20 ----------
.../extensions/wikipedia/_locales/an/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ar/messages.json | 20 ----------
.../wikipedia/_locales/ast/messages.json | 20 ----------
.../extensions/wikipedia/_locales/az/messages.json | 20 ----------
.../wikipedia/_locales/be-tarask/messages.json | 20 ----------
.../extensions/wikipedia/_locales/be/messages.json | 20 ----------
.../extensions/wikipedia/_locales/bg/messages.json | 20 ----------
.../extensions/wikipedia/_locales/bn/messages.json | 20 ----------
.../extensions/wikipedia/_locales/br/messages.json | 20 ----------
.../extensions/wikipedia/_locales/bs/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ca/messages.json | 20 ----------
.../extensions/wikipedia/_locales/cy/messages.json | 20 ----------
.../extensions/wikipedia/_locales/cz/messages.json | 20 ----------
.../extensions/wikipedia/_locales/da/messages.json | 20 ----------
.../extensions/wikipedia/_locales/de/messages.json | 20 ----------
.../wikipedia/_locales/dsb/messages.json | 20 ----------
.../extensions/wikipedia/_locales/el/messages.json | 20 ----------
.../extensions/wikipedia/_locales/en/messages.json | 20 ----------
.../extensions/wikipedia/_locales/eo/messages.json | 20 ----------
.../extensions/wikipedia/_locales/es/messages.json | 20 ----------
.../extensions/wikipedia/_locales/et/messages.json | 20 ----------
.../extensions/wikipedia/_locales/eu/messages.json | 20 ----------
.../extensions/wikipedia/_locales/fa/messages.json | 20 ----------
.../extensions/wikipedia/_locales/fi/messages.json | 20 ----------
.../extensions/wikipedia/_locales/fr/messages.json | 20 ----------
.../wikipedia/_locales/fy-NL/messages.json | 20 ----------
.../wikipedia/_locales/ga-IE/messages.json | 20 ----------
.../extensions/wikipedia/_locales/gd/messages.json | 20 ----------
.../extensions/wikipedia/_locales/gl/messages.json | 20 ----------
.../extensions/wikipedia/_locales/gn/messages.json | 20 ----------
.../extensions/wikipedia/_locales/gu/messages.json | 20 ----------
.../extensions/wikipedia/_locales/he/messages.json | 20 ----------
.../extensions/wikipedia/_locales/hi/messages.json | 20 ----------
.../extensions/wikipedia/_locales/hr/messages.json | 20 ----------
.../wikipedia/_locales/hsb/messages.json | 20 ----------
.../extensions/wikipedia/_locales/hu/messages.json | 20 ----------
.../extensions/wikipedia/_locales/hy/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ia/messages.json | 20 ----------
.../extensions/wikipedia/_locales/id/messages.json | 20 ----------
.../extensions/wikipedia/_locales/is/messages.json | 20 ----------
.../extensions/wikipedia/_locales/it/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ja/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ka/messages.json | 20 ----------
.../wikipedia/_locales/kab/messages.json | 20 ----------
.../extensions/wikipedia/_locales/kk/messages.json | 20 ----------
.../extensions/wikipedia/_locales/km/messages.json | 20 ----------
.../extensions/wikipedia/_locales/kn/messages.json | 20 ----------
.../extensions/wikipedia/_locales/kr/messages.json | 20 ----------
.../wikipedia/_locales/lij/messages.json | 20 ----------
.../extensions/wikipedia/_locales/lo/messages.json | 20 ----------
.../extensions/wikipedia/_locales/lt/messages.json | 20 ----------
.../wikipedia/_locales/ltg/messages.json | 20 ----------
.../extensions/wikipedia/_locales/lv/messages.json | 20 ----------
.../extensions/wikipedia/_locales/mk/messages.json | 20 ----------
.../extensions/wikipedia/_locales/mr/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ms/messages.json | 20 ----------
.../extensions/wikipedia/_locales/my/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ne/messages.json | 20 ----------
.../extensions/wikipedia/_locales/nl/messages.json | 20 ----------
.../extensions/wikipedia/_locales/oc/messages.json | 20 ----------
.../extensions/wikipedia/_locales/pa/messages.json | 20 ----------
.../extensions/wikipedia/_locales/pl/messages.json | 20 ----------
.../extensions/wikipedia/_locales/pt/messages.json | 20 ----------
.../extensions/wikipedia/_locales/rm/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ro/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ru/messages.json | 20 ----------
.../extensions/wikipedia/_locales/si/messages.json | 20 ----------
.../extensions/wikipedia/_locales/sk/messages.json | 20 ----------
.../extensions/wikipedia/_locales/sl/messages.json | 20 ----------
.../extensions/wikipedia/_locales/sq/messages.json | 20 ----------
.../extensions/wikipedia/_locales/sr/messages.json | 20 ----------
.../wikipedia/_locales/sv-SE/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ta/messages.json | 20 ----------
.../extensions/wikipedia/_locales/te/messages.json | 20 ----------
.../extensions/wikipedia/_locales/th/messages.json | 20 ----------
.../extensions/wikipedia/_locales/tl/messages.json | 20 ----------
.../extensions/wikipedia/_locales/tr/messages.json | 20 ----------
.../extensions/wikipedia/_locales/uk/messages.json | 20 ----------
.../extensions/wikipedia/_locales/ur/messages.json | 20 ----------
.../extensions/wikipedia/_locales/uz/messages.json | 20 ----------
.../extensions/wikipedia/_locales/vi/messages.json | 20 ----------
.../extensions/wikipedia/_locales/wo/messages.json | 20 ----------
.../wikipedia/_locales/zh-CN/messages.json | 20 ----------
.../wikipedia/_locales/zh-TW/messages.json | 20 ----------
.../search/extensions/wikipedia/manifest.json | 15 ++++----
.../components/search/extensions/yahoo/favicon.ico | Bin 0 -> 5430 bytes
.../search/extensions/yahoo/manifest.json | 28 ++++++++++++++
.../search/extensions/youtube/favicon.ico | Bin 0 -> 1150 bytes
.../search/extensions/youtube/manifest.json | 26 +++++++++++++
tbb-tests/browser_tor_omnibox.js | 14 +++++++
toolkit/components/search/SearchService.jsm | 28 ++++++--------
109 files changed, 177 insertions(+), 1927 deletions(-)
diff --git a/browser/components/search/extensions/ddg-onion/favicon.ico b/browser/components/search/extensions/ddg-onion/favicon.ico
new file mode 100644
index 000000000000..13c325f6585f
Binary files /dev/null and b/browser/components/search/extensions/ddg-onion/favicon.ico differ
diff --git a/browser/components/search/extensions/ddg-onion/manifest.json b/browser/components/search/extensions/ddg-onion/manifest.json
new file mode 100644
index 000000000000..294496b78368
--- /dev/null
+++ b/browser/components/search/extensions/ddg-onion/manifest.json
@@ -0,0 +1,26 @@
+{
+ "name": "DuckDuckGoOnion",
+ "description": "Duck Duck Go Onion",
+ "manifest_version": 2,
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "id": "ddg-onion(a)search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "icons": {
+ "16": "favicon.ico"
+ },
+ "web_accessible_resources": [
+ "favicon.ico"
+ ],
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "DuckDuckGoOnion",
+ "search_url": "https://3g2upl4pq6kufc4m.onion",
+ "search_form": "https://3g2upl4pq6kufc4m.onion",
+ "search_url_post_params": "q={searchTerms}"
+ }
+ }
+}
\ No newline at end of file
diff --git a/browser/components/search/extensions/ddg/favicon.ico b/browser/components/search/extensions/ddg/favicon.ico
deleted file mode 100644
index dda80dfd88d5..000000000000
Binary files a/browser/components/search/extensions/ddg/favicon.ico and /dev/null differ
diff --git a/browser/components/search/extensions/ddg/favicon.png b/browser/components/search/extensions/ddg/favicon.png
new file mode 100644
index 000000000000..c853b95b89ef
Binary files /dev/null and b/browser/components/search/extensions/ddg/favicon.png differ
diff --git a/browser/components/search/extensions/ddg/manifest.json b/browser/components/search/extensions/ddg/manifest.json
index 782b860a679f..f6aacc3dd069 100644
--- a/browser/components/search/extensions/ddg/manifest.json
+++ b/browser/components/search/extensions/ddg/manifest.json
@@ -10,50 +10,18 @@
},
"hidden": true,
"icons": {
- "16": "favicon.ico"
+ "16": "favicon.png"
},
"web_accessible_resources": [
- "favicon.ico"
+ "favicon.png"
],
"chrome_settings_overrides": {
"search_provider": {
"keyword": ["@duckduckgo", "@ddg"],
"name": "DuckDuckGo",
- "search_url": "https://duckduckgo.com/",
- "search_form": "https://duckduckgo.com/?q={searchTerms}",
- "search_url_get_params": "q={searchTerms}",
- "params": [
- {
- "name": "t",
- "condition": "purpose",
- "purpose": "contextmenu",
- "value": "ffcm"
- },
- {
- "name": "t",
- "condition": "purpose",
- "purpose": "keyword",
- "value": "ffab"
- },
- {
- "name": "t",
- "condition": "purpose",
- "purpose": "searchbar",
- "value": "ffsb"
- },
- {
- "name": "t",
- "condition": "purpose",
- "purpose": "homepage",
- "value": "ffhp"
- },
- {
- "name": "t",
- "condition": "purpose",
- "purpose": "newtab",
- "value": "ffnt"
- }
- ],
+ "search_url": "https://duckduckgo.com",
+ "search_form": "https://duckduckgo.com",
+ "search_url_post_params": "q={searchTerms}",
"suggest_url": "https://ac.duckduckgo.com/ac/",
"suggest_url_get_params": "q={searchTerms}&type=list"
}
diff --git a/browser/components/search/extensions/google/_locales/b-1-d/messages.json b/browser/components/search/extensions/google/_locales/b-1-d/messages.json
deleted file mode 100644
index 1b9d05307d64..000000000000
--- a/browser/components/search/extensions/google/_locales/b-1-d/messages.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "extensionName": {
- "message": "Google"
- },
- "extensionDescription": {
- "message": "Google Search"
- },
- "searchUrl": {
- "message": "https://www.google.com/search"
- },
- "searchForm": {
- "message": "https://www.google.com/search?client=firefox-b-1-d&q={searchTerms}"
- },
- "suggestUrl": {
- "message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "client=firefox-b-1-d&q={searchTerms}"
- },
- "channelPref": {
- "message": "google_channel_us"
- }
-}
diff --git a/browser/components/search/extensions/google/_locales/b-1-e/messages.json b/browser/components/search/extensions/google/_locales/b-1-e/messages.json
deleted file mode 100644
index b470cd844331..000000000000
--- a/browser/components/search/extensions/google/_locales/b-1-e/messages.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "extensionName": {
- "message": "Google"
- },
- "extensionDescription": {
- "message": "Google Search"
- },
- "searchUrl": {
- "message": "https://www.google.com/search"
- },
- "searchForm": {
- "message": "https://www.google.com/search?client=firefox-b-1-e&q={searchTerms}"
- },
- "suggestUrl": {
- "message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "client=firefox-b-1-e&q={searchTerms}"
- },
- "channelPref": {
- "message": "google_channel_us"
- }
-}
diff --git a/browser/components/search/extensions/google/_locales/b-d/messages.json b/browser/components/search/extensions/google/_locales/b-d/messages.json
deleted file mode 100644
index a6423089d9f9..000000000000
--- a/browser/components/search/extensions/google/_locales/b-d/messages.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "extensionName": {
- "message": "Google"
- },
- "extensionDescription": {
- "message": "Google Search"
- },
- "searchUrl": {
- "message": "https://www.google.com/search"
- },
- "searchForm": {
- "message": "https://www.google.com/search?client=firefox-b-d&q={searchTerms}"
- },
- "suggestUrl": {
- "message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "client=firefox-b-d&q={searchTerms}"
- },
- "channelPref": {
- "message": "google_channel_row"
- }
-}
diff --git a/browser/components/search/extensions/google/_locales/b-e/messages.json b/browser/components/search/extensions/google/_locales/b-e/messages.json
deleted file mode 100644
index 70939ee00074..000000000000
--- a/browser/components/search/extensions/google/_locales/b-e/messages.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "extensionName": {
- "message": "Google"
- },
- "extensionDescription": {
- "message": "Google Search"
- },
- "searchUrl": {
- "message": "https://www.google.com/search"
- },
- "searchForm": {
- "message": "https://www.google.com/search?client=firefox-b-e&q={searchTerms}"
- },
- "suggestUrl": {
- "message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "client=firefox-b-e&q={searchTerms}"
- },
- "channelPref": {
- "message": "google_channel_row"
- }
-}
diff --git a/browser/components/search/extensions/google/_locales/en/messages.json b/browser/components/search/extensions/google/_locales/en/messages.json
deleted file mode 100644
index aeca0ef128b3..000000000000
--- a/browser/components/search/extensions/google/_locales/en/messages.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "extensionName": {
- "message": "Google"
- },
- "extensionDescription": {
- "message": "Google Search"
- },
- "searchUrl": {
- "message": "https://www.google.com/search"
- },
- "searchForm": {
- "message": "https://www.google.com/search?client=firefox-b-d&q={searchTerms}"
- },
- "suggestUrl": {
- "message": "https://www.google.com/complete/search?client=firefox&q={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "client=firefox-b-d&q={searchTerms}"
- },
- "channelPref": {
- "message": "google_channel_row"
- }
-
-}
diff --git a/browser/components/search/extensions/google/manifest.json b/browser/components/search/extensions/google/manifest.json
index d62049705ae2..965940517ba4 100644
--- a/browser/components/search/extensions/google/manifest.json
+++ b/browser/components/search/extensions/google/manifest.json
@@ -1,6 +1,6 @@
{
- "name": "__MSG_extensionName__",
- "description": "__MSG_extensionDescription__",
+ "name": "Google",
+ "description": "Google Search",
"manifest_version": 2,
"version": "1.1",
"applications": {
@@ -9,7 +9,6 @@
}
},
"hidden": true,
- "default_locale": "en",
"icons": {
"16": "favicon.ico"
},
@@ -19,18 +18,18 @@
"chrome_settings_overrides": {
"search_provider": {
"keyword": "@google",
- "name": "__MSG_extensionName__",
- "search_url": "__MSG_searchUrl__",
- "search_form": "__MSG_searchForm__",
- "suggest_url": "__MSG_suggestUrl__",
+ "name": "Google",
+ "search_url": "https://www.google.com/search",
+ "search_form": "https://www.google.com/search?client=firefox-b-d&q={searchTerms}",
+ "suggest_url": "https://www.google.com/complete/search?client=firefox&q={searchTerms}",
"params": [
{
"name": "channel",
"condition": "pref",
- "pref": "__MSG_channelPref__"
+ "pref": "google_channel_row"
}
],
- "search_url_get_params": "__MSG_searchUrlGetParams__"
+ "search_url_get_params": "client=firefox-b-d&q={searchTerms}"
}
}
}
diff --git a/browser/components/search/extensions/startpage/favicon.png b/browser/components/search/extensions/startpage/favicon.png
new file mode 100644
index 000000000000..44b94a986fd2
Binary files /dev/null and b/browser/components/search/extensions/startpage/favicon.png differ
diff --git a/browser/components/search/extensions/startpage/manifest.json b/browser/components/search/extensions/startpage/manifest.json
new file mode 100644
index 000000000000..c9bd9e1848d0
--- /dev/null
+++ b/browser/components/search/extensions/startpage/manifest.json
@@ -0,0 +1,26 @@
+{
+ "name": "Startpage",
+ "description": "Start Page",
+ "manifest_version": 2,
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "id": "startpage(a)search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "icons": {
+ "16": "favicon.png"
+ },
+ "web_accessible_resources": [
+ "favicon.png"
+ ],
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "Startpage",
+ "search_url": "https://startpage.com/rto/search",
+ "search_form": "https://startpage.com/rto/search/",
+ "search_url_post_params": "q={searchTerms}"
+ }
+ }
+}
\ No newline at end of file
diff --git a/browser/components/search/extensions/twitter/favicon.ico b/browser/components/search/extensions/twitter/favicon.ico
new file mode 100644
index 000000000000..e5aaff437912
Binary files /dev/null and b/browser/components/search/extensions/twitter/favicon.ico differ
diff --git a/browser/components/search/extensions/twitter/manifest.json b/browser/components/search/extensions/twitter/manifest.json
new file mode 100644
index 000000000000..59714e0e1045
--- /dev/null
+++ b/browser/components/search/extensions/twitter/manifest.json
@@ -0,0 +1,26 @@
+{
+ "name": "Twitter",
+ "description": "Realtime Twitter Search",
+ "manifest_version": 2,
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "id": "twitter(a)search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "icons": {
+ "16": "favicon.ico"
+ },
+ "web_accessible_resources": [
+ "favicon.ico"
+ ],
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "Twitter",
+ "search_url": "https://twitter.com/search",
+ "search_form": "https://twitter.com/search?q={searchTerms}&partner=Firefox&source=desktop-s…",
+ "search_url_get_params": "q={searchTerms}&partner=Firefox&source=desktop-search"
+ }
+ }
+}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/NN/messages.json b/browser/components/search/extensions/wikipedia/_locales/NN/messages.json
deleted file mode 100644
index e4ee66bc780d..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/NN/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (nn)"
- },
- "extensionDescription": {
- "message": "Wikipedia, det frie oppslagsverket"
- },
- "searchUrl": {
- "message": "https://nn.wikipedia.org/wiki/Spesial:Søk"
- },
- "searchForm": {
- "message": "https://nn.wikipedia.org/wiki/Spesial:Søk?search={searchTerms}&sourceid=Moz…"
- },
- "suggestUrl": {
- "message": "https://nn.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/NO/messages.json b/browser/components/search/extensions/wikipedia/_locales/NO/messages.json
deleted file mode 100644
index ec016ac7337e..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/NO/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (no)"
- },
- "extensionDescription": {
- "message": "Wikipedia, den frie encyklopedi"
- },
- "searchUrl": {
- "message": "https://no.wikipedia.org/wiki/Spesial:Søk"
- },
- "searchForm": {
- "message": "https://no.wikipedia.org/wiki/Spesial:Søk?search={searchTerms}&sourceid=Moz…"
- },
- "suggestUrl": {
- "message": "https://no.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/af/messages.json b/browser/components/search/extensions/wikipedia/_locales/af/messages.json
deleted file mode 100644
index 8cf9de8ac9b3..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/af/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (af)"
- },
- "extensionDescription": {
- "message": "Wikipedia, die vrye ensiklopedie"
- },
- "searchUrl": {
- "message": "https://af.wikipedia.org/wiki/Spesiaal:Soek"
- },
- "searchForm": {
- "message": "https://af.wikipedia.org/wiki/Spesiaal:Soek?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://af.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/an/messages.json b/browser/components/search/extensions/wikipedia/_locales/an/messages.json
deleted file mode 100644
index e8cce665c96e..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/an/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Biquipedia (an)"
- },
- "extensionDescription": {
- "message": "A enciclopedia Libre"
- },
- "searchUrl": {
- "message": "https://an.wikipedia.org/wiki/Especial:Mirar"
- },
- "searchForm": {
- "message": "https://an.wikipedia.org/wiki/Especial:Mirar?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://an.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ar/messages.json b/browser/components/search/extensions/wikipedia/_locales/ar/messages.json
deleted file mode 100644
index de90b2a2055e..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ar/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "ويكيبيديا (ar)"
- },
- "extensionDescription": {
- "message": "ويكيبيديا (ar)"
- },
- "searchUrl": {
- "message": "https://ar.wikipedia.org/wiki/خاص:بحث"
- },
- "searchForm": {
- "message": "https://ar.wikipedia.org/wiki/خاص:بحث?search={searchTerms}&sourceid=Mozilla…"
- },
- "suggestUrl": {
- "message": "https://ar.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ast/messages.json b/browser/components/search/extensions/wikipedia/_locales/ast/messages.json
deleted file mode 100644
index a127ba07f29b..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ast/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (ast)"
- },
- "extensionDescription": {
- "message": "La enciclopedia llibre"
- },
- "searchUrl": {
- "message": "https://ast.wikipedia.org/wiki/Especial:Gueta"
- },
- "searchForm": {
- "message": "https://ast.wikipedia.org/wiki/Especial:Gueta?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://ast.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/az/messages.json b/browser/components/search/extensions/wikipedia/_locales/az/messages.json
deleted file mode 100644
index f551a717e6d3..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/az/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vikipediya (az)"
- },
- "extensionDescription": {
- "message": "Vikipediya, açıq ensiklopediya"
- },
- "searchUrl": {
- "message": "https://az.wikipedia.org/wiki/Xüsusi:Axtar"
- },
- "searchForm": {
- "message": "https://az.wikipedia.org/wiki/Xüsusi:Axtar?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://az.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/be-tarask/messages.json b/browser/components/search/extensions/wikipedia/_locales/be-tarask/messages.json
deleted file mode 100644
index aecfecf2fb19..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/be-tarask/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Вікіпэдыя (be-tarask)"
- },
- "extensionDescription": {
- "message": "Вікіпэдыя, вольная энцыкляпэдыя"
- },
- "searchUrl": {
- "message": "https://be-tarask.wikipedia.org/wiki/Спэцыяльныя:Пошук"
- },
- "searchForm": {
- "message": "https://be-tarask.wikipedia.org/wiki/Спэцыяльныя:Пошук?search={searchTerms}…"
- },
- "suggestUrl": {
- "message": "https://be-tarask.wikipedia.org/w/api.php?action=opensearch&search={searchT…"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/be/messages.json b/browser/components/search/extensions/wikipedia/_locales/be/messages.json
deleted file mode 100644
index 6aa763451e67..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/be/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Вікіпедыя (be)"
- },
- "extensionDescription": {
- "message": "Вікіпедыя, свабодная энцыклапедыя"
- },
- "searchUrl": {
- "message": "https://be.wikipedia.org/wiki/Адмысловае:Search"
- },
- "searchForm": {
- "message": "https://be.wikipedia.org/wiki/Адмысловае:Search?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://be.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/bg/messages.json b/browser/components/search/extensions/wikipedia/_locales/bg/messages.json
deleted file mode 100644
index 896a85d66b87..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/bg/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Уикипедия (bg)"
- },
- "extensionDescription": {
- "message": "Уикипедия, свободната енциклоподия"
- },
- "searchUrl": {
- "message": "https://bg.wikipedia.org/wiki/Специални:Търсене"
- },
- "searchForm": {
- "message": "https://bg.wikipedia.org/wiki/Специални:Търсене?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://bg.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/bn/messages.json b/browser/components/search/extensions/wikipedia/_locales/bn/messages.json
deleted file mode 100644
index fe9887ed1938..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/bn/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "উইকিপিডিয়া (bn)"
- },
- "extensionDescription": {
- "message": "উইকিপিডিয়া, মুক্ত বিশ্বকোষ"
- },
- "searchUrl": {
- "message": "https://bn.wikipedia.org/wiki/বিশেষ:Search"
- },
- "searchForm": {
- "message": "https://bn.wikipedia.org/wiki/বিশেষ:Search?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://bn.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/br/messages.json b/browser/components/search/extensions/wikipedia/_locales/br/messages.json
deleted file mode 100644
index 33869ce8e752..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/br/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (br)"
- },
- "extensionDescription": {
- "message": "Wikipedia, an holloueziadur digor"
- },
- "searchUrl": {
- "message": "https://br.wikipedia.org/wiki/Dibar:Klask"
- },
- "searchForm": {
- "message": "https://br.wikipedia.org/wiki/Dibar:Klask?search={searchTerms}&sourceid=Moz…"
- },
- "suggestUrl": {
- "message": "https://br.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/bs/messages.json b/browser/components/search/extensions/wikipedia/_locales/bs/messages.json
deleted file mode 100644
index 746150e3d8e8..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/bs/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (bs)"
- },
- "extensionDescription": {
- "message": "Slobodna enciklopedija"
- },
- "searchUrl": {
- "message": "https://bs.wikipedia.org/wiki/Posebno:Pretraga"
- },
- "searchForm": {
- "message": "https://bs.wikipedia.org/wiki/Posebno:Pretraga?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://bs.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ca/messages.json b/browser/components/search/extensions/wikipedia/_locales/ca/messages.json
deleted file mode 100644
index 151ec1a71ba5..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ca/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Viquipèdia (ca)"
- },
- "extensionDescription": {
- "message": "L'enciclopèdia lliure"
- },
- "searchUrl": {
- "message": "https://ca.wikipedia.org/wiki/Especial:Cerca"
- },
- "searchForm": {
- "message": "https://ca.wikipedia.org/wiki/Especial:Cerca?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://ca.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/cy/messages.json b/browser/components/search/extensions/wikipedia/_locales/cy/messages.json
deleted file mode 100644
index cfed7c73be34..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/cy/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wicipedia (cy)"
- },
- "extensionDescription": {
- "message": "Wicipedia, Y Gwyddioniadur Rhydd"
- },
- "searchUrl": {
- "message": "https://cy.wikipedia.org/wiki/Arbennig:Search"
- },
- "searchForm": {
- "message": "https://cy.wikipedia.org/wiki/Arbennig:Search?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://cy.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/cz/messages.json b/browser/components/search/extensions/wikipedia/_locales/cz/messages.json
deleted file mode 100644
index 12f7eb22d711..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/cz/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedie (cs)"
- },
- "extensionDescription": {
- "message": "Wikipedia, svobodná encyclopedie"
- },
- "searchUrl": {
- "message": "https://cs.wikipedia.org/wiki/Speciální:Hledání"
- },
- "searchForm": {
- "message": "https://cs.wikipedia.org/wiki/Speciální:Hledání?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://cs.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/da/messages.json b/browser/components/search/extensions/wikipedia/_locales/da/messages.json
deleted file mode 100644
index 801d5a5183cc..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/da/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (da)"
- },
- "extensionDescription": {
- "message": "Wikipedia, den frie encyklopædi"
- },
- "searchUrl": {
- "message": "https://da.wikipedia.org/wiki/Speciel:Søgning"
- },
- "searchForm": {
- "message": "https://da.wikipedia.org/wiki/Speciel:Søgning?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://da.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/de/messages.json b/browser/components/search/extensions/wikipedia/_locales/de/messages.json
deleted file mode 100644
index 0e6bbe8905ca..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/de/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (de)"
- },
- "extensionDescription": {
- "message": "Wikipedia, die freie Enzyklopädie"
- },
- "searchUrl": {
- "message": "https://de.wikipedia.org/wiki/Spezial:Suche"
- },
- "searchForm": {
- "message": "https://de.wikipedia.org/wiki/Spezial:Suche?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://de.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/dsb/messages.json b/browser/components/search/extensions/wikipedia/_locales/dsb/messages.json
deleted file mode 100644
index ffca44b5f7fb..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/dsb/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedija (dsb)"
- },
- "extensionDescription": {
- "message": "Wikipedija, lichotna encyklopedija"
- },
- "searchUrl": {
- "message": "https://dsb.wikipedia.org/wiki/Specialne:Pytaś"
- },
- "searchForm": {
- "message": "https://dsb.wikipedia.org/wiki/Specialne:Pytaś?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://dsb.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/el/messages.json b/browser/components/search/extensions/wikipedia/_locales/el/messages.json
deleted file mode 100644
index 95b48f3d9ca7..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/el/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (el)"
- },
- "extensionDescription": {
- "message": "Βικιπαίδεια, η ελεύθερη εγκυκλοπαίδεια"
- },
- "searchUrl": {
- "message": "https://el.wikipedia.org/wiki/Ειδικό:Αναζήτηση"
- },
- "searchForm": {
- "message": "https://el.wikipedia.org/wiki/Ειδικό:Αναζήτηση?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://el.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/en/messages.json b/browser/components/search/extensions/wikipedia/_locales/en/messages.json
deleted file mode 100644
index 0de3c9a8071a..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/en/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (en)"
- },
- "extensionDescription": {
- "message": "Wikipedia, the Free Encyclopedia"
- },
- "searchUrl": {
- "message": "https://en.wikipedia.org/wiki/Special:Search"
- },
- "searchForm": {
- "message": "https://en.wikipedia.org/wiki/Special:Search?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://en.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/eo/messages.json b/browser/components/search/extensions/wikipedia/_locales/eo/messages.json
deleted file mode 100644
index 10aa88dd11ba..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/eo/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vikipedio (eo)"
- },
- "extensionDescription": {
- "message": "Vikipedio, la libera enciklopedio"
- },
- "searchUrl": {
- "message": "https://eo.wikipedia.org/wiki/Specialaĵo:Serĉi"
- },
- "searchForm": {
- "message": "https://eo.wikipedia.org/wiki/Specialaĵo:Serĉi?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://eo.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/es/messages.json b/browser/components/search/extensions/wikipedia/_locales/es/messages.json
deleted file mode 100644
index 09ec1f757657..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/es/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (es)"
- },
- "extensionDescription": {
- "message": "Wikipedia, la enciclopedia libre"
- },
- "searchUrl": {
- "message": "https://es.wikipedia.org/wiki/Especial:Buscar"
- },
- "searchForm": {
- "message": "https://es.wikipedia.org/wiki/Especial:Buscar?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://es.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/et/messages.json b/browser/components/search/extensions/wikipedia/_locales/et/messages.json
deleted file mode 100644
index 91363fbb392b..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/et/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vikipeedia (et)"
- },
- "extensionDescription": {
- "message": "Vikipeedia, vaba entsüklopeedia"
- },
- "searchUrl": {
- "message": "https://et.wikipedia.org/wiki/Eri:Otsimine"
- },
- "searchForm": {
- "message": "https://et.wikipedia.org/wiki/Eri:Otsimine?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://et.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/eu/messages.json b/browser/components/search/extensions/wikipedia/_locales/eu/messages.json
deleted file mode 100644
index 1bd7027dec54..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/eu/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (eu)"
- },
- "extensionDescription": {
- "message": "Wikipedia, entziklopedia askea"
- },
- "searchUrl": {
- "message": "https://eu.wikipedia.org/wiki/Berezi:Bilatu"
- },
- "searchForm": {
- "message": "https://eu.wikipedia.org/wiki/Berezi:Bilatu?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://eu.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/fa/messages.json b/browser/components/search/extensions/wikipedia/_locales/fa/messages.json
deleted file mode 100644
index 9fdc964a1e0b..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/fa/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "ویکیپدیا (fa)"
- },
- "extensionDescription": {
- "message": "ویکیپدیا، دانشنامهٔ آزاد"
- },
- "searchUrl": {
- "message": "https://fa.wikipedia.org/wiki/ویژه:جستجو"
- },
- "searchForm": {
- "message": "https://fa.wikipedia.org/wiki/ویژه:جستجو?search={searchTerms}&sourceid=Mozi…"
- },
- "suggestUrl": {
- "message": "https://fa.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/fi/messages.json b/browser/components/search/extensions/wikipedia/_locales/fi/messages.json
deleted file mode 100644
index 17a9cbe22c42..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/fi/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (fi)"
- },
- "extensionDescription": {
- "message": "Wikipedia (fi), vapaa tietosanakirja"
- },
- "searchUrl": {
- "message": "https://fi.wikipedia.org/wiki/Toiminnot:Haku"
- },
- "searchForm": {
- "message": "https://fi.wikipedia.org/wiki/Toiminnot:Haku?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://fi.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/fr/messages.json b/browser/components/search/extensions/wikipedia/_locales/fr/messages.json
deleted file mode 100644
index 33dcbe9dc502..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/fr/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipédia (fr)"
- },
- "extensionDescription": {
- "message": "Wikipédia, l'encyclopédie libre"
- },
- "searchUrl": {
- "message": "https://fr.wikipedia.org/wiki/Spécial:Recherche"
- },
- "searchForm": {
- "message": "https://fr.wikipedia.org/wiki/Spécial:Recherche?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://fr.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/fy-NL/messages.json b/browser/components/search/extensions/wikipedia/_locales/fy-NL/messages.json
deleted file mode 100644
index f350162fbbaf..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/fy-NL/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedy (fy)"
- },
- "extensionDescription": {
- "message": "De fergese ensyklopedy"
- },
- "searchUrl": {
- "message": "https://fy.wikipedia.org/wiki/Wiki:Sykje"
- },
- "searchForm": {
- "message": "https://fy.wikipedia.org/wiki/Wiki:Sykje?search={searchTerms}&sourceid=Mozi…"
- },
- "suggestUrl": {
- "message": "https://fy.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ga-IE/messages.json b/browser/components/search/extensions/wikipedia/_locales/ga-IE/messages.json
deleted file mode 100644
index 994ea723c6da..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ga-IE/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vicipéid (ga)"
- },
- "extensionDescription": {
- "message": "Vicipéid, an Chiclipéid Shaor"
- },
- "searchUrl": {
- "message": "https://ga.wikipedia.org/wiki/Speisialta:Search"
- },
- "searchForm": {
- "message": "https://ga.wikipedia.org/wiki/Speisialta:Search?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://ga.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/gd/messages.json b/browser/components/search/extensions/wikipedia/_locales/gd/messages.json
deleted file mode 100644
index f16f16fb4a02..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/gd/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Uicipeid (gd)"
- },
- "extensionDescription": {
- "message": "Wikipedia, An leabhar mòr-eòlais"
- },
- "searchUrl": {
- "message": "https://gd.wikipedia.org/wiki/Sònraichte:Search"
- },
- "searchForm": {
- "message": "https://gd.wikipedia.org/wiki/Sònraichte:Search?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://gd.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/gl/messages.json b/browser/components/search/extensions/wikipedia/_locales/gl/messages.json
deleted file mode 100644
index 88880bffc3d9..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/gl/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (gl)"
- },
- "extensionDescription": {
- "message": "Wikipedia, a enciclopedia libre"
- },
- "searchUrl": {
- "message": "https://gl.wikipedia.org/wiki/Especial:Procurar"
- },
- "searchForm": {
- "message": "https://gl.wikipedia.org/wiki/Especial:Procurar?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://gl.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/gn/messages.json b/browser/components/search/extensions/wikipedia/_locales/gn/messages.json
deleted file mode 100644
index 5efc5ed74a95..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/gn/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vikipetã (gn)"
- },
- "extensionDescription": {
- "message": "Vikipetã, opaite tembikuaa hekosãsóva renda"
- },
- "searchUrl": {
- "message": "https://gn.wikipedia.org/wiki/Mba'echĩchĩ:Buscar"
- },
- "searchForm": {
- "message": "https://gn.wikipedia.org/wiki/Mba'echĩchĩ:Buscar?search={searchTerms}&sourceid=Mozilla-search"
- },
- "suggestUrl": {
- "message": "https://gn.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/gu/messages.json b/browser/components/search/extensions/wikipedia/_locales/gu/messages.json
deleted file mode 100644
index 3d2f68826fc5..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/gu/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "વિકિપીડિયા (gu)"
- },
- "extensionDescription": {
- "message": "વીકીપીડિયા, મુક્ત એનસાયક્લોપીડિયા"
- },
- "searchUrl": {
- "message": "https://gu.wikipedia.org/wiki/વિશેષ:શોધ"
- },
- "searchForm": {
- "message": "https://gu.wikipedia.org/wiki/વિશેષ:શોધ?search={searchTerms}&sourceid=Mozil…"
- },
- "suggestUrl": {
- "message": "https://gu.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/he/messages.json b/browser/components/search/extensions/wikipedia/_locales/he/messages.json
deleted file mode 100644
index 1f8471e980f0..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/he/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "ויקיפדיה"
- },
- "extensionDescription": {
- "message": "ויקיפדיה"
- },
- "searchUrl": {
- "message": "https://he.wikipedia.org/wiki/מיוחד:חיפוש"
- },
- "searchForm": {
- "message": "https://he.wikipedia.org/wiki/מיוחד:חיפוש?search={searchTerms}&sourceid=Moz…"
- },
- "suggestUrl": {
- "message": "https://he.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/hi/messages.json b/browser/components/search/extensions/wikipedia/_locales/hi/messages.json
deleted file mode 100644
index f3b7d14eafa0..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/hi/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "विकिपीडिया (hi)"
- },
- "extensionDescription": {
- "message": "विकिपीडिया (हिन्दी)"
- },
- "searchUrl": {
- "message": "https://hi.wikipedia.org/wiki/विशेष:खोज"
- },
- "searchForm": {
- "message": "https://hi.wikipedia.org/wiki/विशेष:खोज?search={searchTerms}&sourceid=Mozil…"
- },
- "suggestUrl": {
- "message": "https://hi.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/hr/messages.json b/browser/components/search/extensions/wikipedia/_locales/hr/messages.json
deleted file mode 100644
index 18a6177efcca..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/hr/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedija (hr)"
- },
- "extensionDescription": {
- "message": "Wikipedija, slobodna enciklopedija"
- },
- "searchUrl": {
- "message": "https://hr.wikipedia.org/wiki/Posebno:Traži"
- },
- "searchForm": {
- "message": "https://hr.wikipedia.org/wiki/Posebno:Traži?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://hr.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/hsb/messages.json b/browser/components/search/extensions/wikipedia/_locales/hsb/messages.json
deleted file mode 100644
index d4e62836e6e9..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/hsb/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedija (hsb)"
- },
- "extensionDescription": {
- "message": "Wikipedija, swobodna encyklopedija"
- },
- "searchUrl": {
- "message": "https://hsb.wikipedia.org/wiki/Specialnje:Pytać"
- },
- "searchForm": {
- "message": "https://hsb.wikipedia.org/wiki/Specialnje:Pytać?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://hsb.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/hu/messages.json b/browser/components/search/extensions/wikipedia/_locales/hu/messages.json
deleted file mode 100644
index 68300c48a6f3..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/hu/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipédia (hu)"
- },
- "extensionDescription": {
- "message": "Wikipedia, a szabad enciklopédia"
- },
- "searchUrl": {
- "message": "https://hu.wikipedia.org/wiki/Speciális:Keresés"
- },
- "searchForm": {
- "message": "https://hu.wikipedia.org/wiki/Speciális:Keresés?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://hu.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/hy/messages.json b/browser/components/search/extensions/wikipedia/_locales/hy/messages.json
deleted file mode 100644
index 56c2ae2c641b..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/hy/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (hy)"
- },
- "extensionDescription": {
- "message": "Վիքիփեդիա՝ ազատ հանրագիտարան"
- },
- "searchUrl": {
- "message": "https://hy.wikipedia.org/wiki/Սպասարկող:Որոնել"
- },
- "searchForm": {
- "message": "https://hy.wikipedia.org/wiki/Սպասարկող:Որոնել?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://hy.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ia/messages.json b/browser/components/search/extensions/wikipedia/_locales/ia/messages.json
deleted file mode 100644
index 6d997ae8fc81..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ia/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (ia)"
- },
- "extensionDescription": {
- "message": "Wikipedia, le encyclopedia libere"
- },
- "searchUrl": {
- "message": "https://ia.wikipedia.org/wiki/Special:Recerca"
- },
- "searchForm": {
- "message": "https://ia.wikipedia.org/wiki/Special:Recerca?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://ia.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/id/messages.json b/browser/components/search/extensions/wikipedia/_locales/id/messages.json
deleted file mode 100644
index 1d35e71b956d..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/id/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (id)"
- },
- "extensionDescription": {
- "message": "Wikipedia, ensiklopedia bebas"
- },
- "searchUrl": {
- "message": "https://id.wikipedia.org/wiki/Istimewa:Pencarian"
- },
- "searchForm": {
- "message": "https://id.wikipedia.org/wiki/Istimewa:Pencarian?search={searchTerms}&sourc…"
- },
- "suggestUrl": {
- "message": "https://id.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/is/messages.json b/browser/components/search/extensions/wikipedia/_locales/is/messages.json
deleted file mode 100644
index f722d88187de..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/is/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (is)"
- },
- "extensionDescription": {
- "message": "Wikipedia, the free encyclopedia"
- },
- "searchUrl": {
- "message": "https://is.wikipedia.org/wiki/Kerfissíða:Leit"
- },
- "searchForm": {
- "message": "https://is.wikipedia.org/wiki/Kerfissíða:Leit?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://is.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/it/messages.json b/browser/components/search/extensions/wikipedia/_locales/it/messages.json
deleted file mode 100644
index 2ca645740f87..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/it/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (it)"
- },
- "extensionDescription": {
- "message": "Wikipedia, l'enciclopedia libera"
- },
- "searchUrl": {
- "message": "https://it.wikipedia.org/wiki/Speciale:Ricerca"
- },
- "searchForm": {
- "message": "https://it.wikipedia.org/wiki/Speciale:Ricerca?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://it.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ja/messages.json b/browser/components/search/extensions/wikipedia/_locales/ja/messages.json
deleted file mode 100644
index 7215e68768f0..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ja/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (ja)"
- },
- "extensionDescription": {
- "message": "Wikipedia - フリー百科事典"
- },
- "searchUrl": {
- "message": "https://ja.wikipedia.org/wiki/特別:検索"
- },
- "searchForm": {
- "message": "https://ja.wikipedia.org/wiki/特別:検索?search={searchTerms}&sourceid=Mozilla-s…"
- },
- "suggestUrl": {
- "message": "https://ja.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ka/messages.json b/browser/components/search/extensions/wikipedia/_locales/ka/messages.json
deleted file mode 100644
index c460a093e5e4..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ka/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "ვიკიპედია (ka)"
- },
- "extensionDescription": {
- "message": "ვიკიპედია, თავისუფალი ენციკლოპედია"
- },
- "searchUrl": {
- "message": "https://ka.wikipedia.org/wiki/სპეციალური:ძიება"
- },
- "searchForm": {
- "message": "https://ka.wikipedia.org/wiki/სპეციალური:ძიება?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://ka.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/kab/messages.json b/browser/components/search/extensions/wikipedia/_locales/kab/messages.json
deleted file mode 100644
index 3cf743b616fe..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/kab/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (kab)"
- },
- "extensionDescription": {
- "message": "Wikipedia, tasanayt tilellit"
- },
- "searchUrl": {
- "message": "https://kab.wikipedia.org/wiki/Uslig:Search"
- },
- "searchForm": {
- "message": "https://kab.wikipedia.org/wiki/Uslig:Search?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://kab.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/kk/messages.json b/browser/components/search/extensions/wikipedia/_locales/kk/messages.json
deleted file mode 100644
index 0844cca0d7e1..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/kk/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Уикипедия (kk)"
- },
- "extensionDescription": {
- "message": "Уикипедия (kk)"
- },
- "searchUrl": {
- "message": "https://kk.wikipedia.org/wiki/Арнайы:Іздеу"
- },
- "searchForm": {
- "message": "https://kk.wikipedia.org/wiki/Арнайы:Іздеу?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://kk.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/km/messages.json b/browser/components/search/extensions/wikipedia/_locales/km/messages.json
deleted file mode 100644
index 0f0a0880e188..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/km/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "វីគីភីឌា (km)"
- },
- "extensionDescription": {
- "message": "វីគីភីឌា សព្វវចនាធិប្បាយសេរី"
- },
- "searchUrl": {
- "message": "https://km.wikipedia.org/wiki/ពិសេស:ស្វែងរក"
- },
- "searchForm": {
- "message": "https://km.wikipedia.org/wiki/ពិសេស:ស្វែងរក?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://km.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/kn/messages.json b/browser/components/search/extensions/wikipedia/_locales/kn/messages.json
deleted file mode 100644
index 379ef20085a3..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/kn/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (kn)"
- },
- "extensionDescription": {
- "message": "Wikipedia, the free encyclopedia"
- },
- "searchUrl": {
- "message": "https://kn.wikipedia.org/wiki/ವಿಶೇಷ:Search"
- },
- "searchForm": {
- "message": "https://kn.wikipedia.org/wiki/ವಿಶೇಷ:Search?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://kn.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/kr/messages.json b/browser/components/search/extensions/wikipedia/_locales/kr/messages.json
deleted file mode 100644
index 54296cac62bd..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/kr/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "위키백과 (ko)"
- },
- "extensionDescription": {
- "message": "Wikipedia, the free encyclopedia"
- },
- "searchUrl": {
- "message": "https://ko.wikipedia.org/wiki/특수기능:찾기"
- },
- "searchForm": {
- "message": "https://ko.wikipedia.org/wiki/특수기능:찾기?search={searchTerms}&sourceid=Mozilla…"
- },
- "suggestUrl": {
- "message": "https://ko.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/lij/messages.json b/browser/components/search/extensions/wikipedia/_locales/lij/messages.json
deleted file mode 100644
index cb90db5e4099..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/lij/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (lij)"
- },
- "extensionDescription": {
- "message": "Wikipedia, l'enciclopedia libera"
- },
- "searchUrl": {
- "message": "https://lij.wikipedia.org/wiki/Speçiale:Riçerca"
- },
- "searchForm": {
- "message": "https://lij.wikipedia.org/wiki/Speçiale:Riçerca?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://lij.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/lo/messages.json b/browser/components/search/extensions/wikipedia/_locales/lo/messages.json
deleted file mode 100644
index 712746ec6316..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/lo/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "ວິກິພີເດຍ (lo)"
- },
- "extensionDescription": {
- "message": "ວິກິພີເດຍ, ສາລານຸກົມເສລີ"
- },
- "searchUrl": {
- "message": "https://lo.wikipedia.org/wiki/ພິເສດ:ຊອກຫາ"
- },
- "searchForm": {
- "message": "https://lo.wikipedia.org/wiki/ພິເສດ:ຊອກຫາ?search={searchTerms}&sourceid=Moz…"
- },
- "suggestUrl": {
- "message": "https://lo.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/lt/messages.json b/browser/components/search/extensions/wikipedia/_locales/lt/messages.json
deleted file mode 100644
index c061bcc5224c..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/lt/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (lt)"
- },
- "extensionDescription": {
- "message": "Vikipedija, laisvoji enciklopedija"
- },
- "searchUrl": {
- "message": "https://lt.wikipedia.org/wiki/Specialus:Paieška"
- },
- "searchForm": {
- "message": "https://lt.wikipedia.org/wiki/Specialus:Paieška?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://lt.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ltg/messages.json b/browser/components/search/extensions/wikipedia/_locales/ltg/messages.json
deleted file mode 100644
index 0e02810ef3bf..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ltg/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vikipedeja (ltg)"
- },
- "extensionDescription": {
- "message": "Vikipēdija, breivuo eņciklopedeja"
- },
- "searchUrl": {
- "message": "https://ltg.wikipedia.org/wiki/Seviškuo:Search"
- },
- "searchForm": {
- "message": "https://ltg.wikipedia.org/wiki/Seviškuo:Search?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://ltg.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/lv/messages.json b/browser/components/search/extensions/wikipedia/_locales/lv/messages.json
deleted file mode 100644
index f73814b8574f..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/lv/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vikipēdija"
- },
- "extensionDescription": {
- "message": "Vikipēdija, brīvā enciklopēdija"
- },
- "searchUrl": {
- "message": "https://lv.wikipedia.org/wiki/Special:Search"
- },
- "searchForm": {
- "message": "https://lv.wikipedia.org/wiki/Special:Search?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://lv.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/mk/messages.json b/browser/components/search/extensions/wikipedia/_locales/mk/messages.json
deleted file mode 100644
index de7e06e1ac4a..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/mk/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Википедија (mk)"
- },
- "extensionDescription": {
- "message": "Википедија, слободната енциклопедија"
- },
- "searchUrl": {
- "message": "https://mk.wikipedia.org/wiki/Специјална:Барај"
- },
- "searchForm": {
- "message": "https://mk.wikipedia.org/wiki/Специјална:Барај?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://mk.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/mr/messages.json b/browser/components/search/extensions/wikipedia/_locales/mr/messages.json
deleted file mode 100644
index bd46dd83700c..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/mr/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "विकिपीडिया (mr)"
- },
- "extensionDescription": {
- "message": "विकिपीडिया, मोफत माहितीकोष"
- },
- "searchUrl": {
- "message": "https://mr.wikipedia.org/wiki/विशेष:शोधा"
- },
- "searchForm": {
- "message": "https://mr.wikipedia.org/wiki/विशेष:शोधा?search={searchTerms}&sourceid=Mozi…"
- },
- "suggestUrl": {
- "message": "https://mr.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ms/messages.json b/browser/components/search/extensions/wikipedia/_locales/ms/messages.json
deleted file mode 100644
index c817e82c7821..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ms/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (ms)"
- },
- "extensionDescription": {
- "message": "Wikipedia, ensiklopedia bebas"
- },
- "searchUrl": {
- "message": "https://ms.wikipedia.org/wiki/Khas:Gelintar"
- },
- "searchForm": {
- "message": "https://ms.wikipedia.org/wiki/Khas:Gelintar?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://ms.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/my/messages.json b/browser/components/search/extensions/wikipedia/_locales/my/messages.json
deleted file mode 100644
index 62342d1b90ae..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/my/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (my)"
- },
- "extensionDescription": {
- "message": "အခမဲ့လွတ်လပ်စွယ်စုံကျမ်း"
- },
- "searchUrl": {
- "message": "https://my.wikipedia.org/wiki/Special:Search"
- },
- "searchForm": {
- "message": "https://my.wikipedia.org/wiki/Special:Search?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://my.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ne/messages.json b/browser/components/search/extensions/wikipedia/_locales/ne/messages.json
deleted file mode 100644
index eb22344341e4..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ne/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "विकिपीडिया (ne)"
- },
- "extensionDescription": {
- "message": "विकिपिडिया एक स्वतन्त्र विश्वकोष"
- },
- "searchUrl": {
- "message": "https://ne.wikipedia.org/wiki/विशेष:Search"
- },
- "searchForm": {
- "message": "https://ne.wikipedia.org/wiki/विशेष:Search?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://ne.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/nl/messages.json b/browser/components/search/extensions/wikipedia/_locales/nl/messages.json
deleted file mode 100644
index c2a810c2ae30..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/nl/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (nl)"
- },
- "extensionDescription": {
- "message": "De vrije encyclopedie"
- },
- "searchUrl": {
- "message": "https://nl.wikipedia.org/wiki/Speciaal:Zoeken"
- },
- "searchForm": {
- "message": "https://nl.wikipedia.org/wiki/Speciaal:Zoeken?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://nl.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/oc/messages.json b/browser/components/search/extensions/wikipedia/_locales/oc/messages.json
deleted file mode 100644
index 3cadc3d68f07..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/oc/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipèdia (oc)"
- },
- "extensionDescription": {
- "message": "Wikipèdia, l'enciclopèdia liura"
- },
- "searchUrl": {
- "message": "https://oc.wikipedia.org/wiki/Especial:Recèrca"
- },
- "searchForm": {
- "message": "https://oc.wikipedia.org/wiki/Especial:Recèrca?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://oc.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/pa/messages.json b/browser/components/search/extensions/wikipedia/_locales/pa/messages.json
deleted file mode 100644
index dff38c2146fd..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/pa/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (pa)"
- },
- "extensionDescription": {
- "message": "ਵਿਕਿਪੀਡਿਆ, ਮੁਫ਼ਤ/ਮੁਕਤ ਸ਼ਬਦਕੋਸ਼"
- },
- "searchUrl": {
- "message": "https://pa.wikipedia.org/wiki/ਖ਼ਾਸ:ਖੋਜੋ"
- },
- "searchForm": {
- "message": "https://pa.wikipedia.org/wiki/ਖ਼ਾਸ:ਖੋਜੋ?search={searchTerms}&sourceid=Mozil…"
- },
- "suggestUrl": {
- "message": "https://pa.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/pl/messages.json b/browser/components/search/extensions/wikipedia/_locales/pl/messages.json
deleted file mode 100644
index 315aa0d9cbe1..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/pl/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (pl)"
- },
- "extensionDescription": {
- "message": "Wikipedia, wolna encyklopedia"
- },
- "searchUrl": {
- "message": "https://pl.wikipedia.org/wiki/Specjalna:Szukaj"
- },
- "searchForm": {
- "message": "https://pl.wikipedia.org/wiki/Specjalna:Szukaj?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://pl.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/pt/messages.json b/browser/components/search/extensions/wikipedia/_locales/pt/messages.json
deleted file mode 100644
index 4beaa97acc88..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/pt/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (pt)"
- },
- "extensionDescription": {
- "message": "Wikipédia, a enciclopédia livre"
- },
- "searchUrl": {
- "message": "https://pt.wikipedia.org/wiki/Especial:Pesquisar"
- },
- "searchForm": {
- "message": "https://pt.wikipedia.org/wiki/Especial:Pesquisar?search={searchTerms}&sourc…"
- },
- "suggestUrl": {
- "message": "https://pt.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/rm/messages.json b/browser/components/search/extensions/wikipedia/_locales/rm/messages.json
deleted file mode 100644
index 8258d5e43451..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/rm/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (rm)"
- },
- "extensionDescription": {
- "message": "Vichipedia, l'enciclopedia libra"
- },
- "searchUrl": {
- "message": "https://rm.wikipedia.org/wiki/Spezial:Search"
- },
- "searchForm": {
- "message": "https://rm.wikipedia.org/wiki/Spezial:Search?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://rm.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ro/messages.json b/browser/components/search/extensions/wikipedia/_locales/ro/messages.json
deleted file mode 100644
index 48865fd547e4..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ro/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (ro)"
- },
- "extensionDescription": {
- "message": "Wikipedia, enciclopedia liberă"
- },
- "searchUrl": {
- "message": "https://ro.wikipedia.org/wiki/Special:Căutare"
- },
- "searchForm": {
- "message": "https://ro.wikipedia.org/wiki/Special:Căutare?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://ro.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ru/messages.json b/browser/components/search/extensions/wikipedia/_locales/ru/messages.json
deleted file mode 100644
index 569467691d7c..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ru/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Википедия (ru)"
- },
- "extensionDescription": {
- "message": "Википедия, свободная энциклопедия"
- },
- "searchUrl": {
- "message": "https://ru.wikipedia.org/wiki/Служебная:Поиск"
- },
- "searchForm": {
- "message": "https://ru.wikipedia.org/wiki/Служебная:Поиск?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://ru.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/si/messages.json b/browser/components/search/extensions/wikipedia/_locales/si/messages.json
deleted file mode 100644
index 0406ae728d71..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/si/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (si)"
- },
- "extensionDescription": {
- "message": "Wikipedia, the free encyclopedia"
- },
- "searchUrl": {
- "message": "https://si.wikipedia.org/wiki/විශේෂ:ගවේෂණය"
- },
- "searchForm": {
- "message": "https://si.wikipedia.org/wiki/විශේෂ:ගවේෂණය?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://si.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/sk/messages.json b/browser/components/search/extensions/wikipedia/_locales/sk/messages.json
deleted file mode 100644
index 5c2f75f8b031..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/sk/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipédia (sk)"
- },
- "extensionDescription": {
- "message": "Wikipédia, slobodná a otvorená encyklopédia"
- },
- "searchUrl": {
- "message": "https://sk.wikipedia.org/wiki/Špeciálne:Hľadanie"
- },
- "searchForm": {
- "message": "https://sk.wikipedia.org/wiki/Špeciálne:Hľadanie?search={searchTerms}&sourc…"
- },
- "suggestUrl": {
- "message": "https://sk.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/sl/messages.json b/browser/components/search/extensions/wikipedia/_locales/sl/messages.json
deleted file mode 100644
index 7385a2203474..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/sl/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedija (sl)"
- },
- "extensionDescription": {
- "message": "Wikipedija, prosta enciklopedija"
- },
- "searchUrl": {
- "message": "https://sl.wikipedia.org/wiki/Posebno:Iskanje"
- },
- "searchForm": {
- "message": "https://sl.wikipedia.org/wiki/Posebno:Iskanje?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://sl.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/sq/messages.json b/browser/components/search/extensions/wikipedia/_locales/sq/messages.json
deleted file mode 100644
index 68361d8ab294..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/sq/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (sq)"
- },
- "extensionDescription": {
- "message": "Wikipedia, enciklopedia e lirë"
- },
- "searchUrl": {
- "message": "https://sq.wikipedia.org/wiki/Speciale:Kërkim"
- },
- "searchForm": {
- "message": "https://sq.wikipedia.org/wiki/Speciale:Kërkim?search={searchTerms}&sourceid…"
- },
- "suggestUrl": {
- "message": "https://sq.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/sr/messages.json b/browser/components/search/extensions/wikipedia/_locales/sr/messages.json
deleted file mode 100644
index 50ebc0a197a1..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/sr/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Википедија (sr)"
- },
- "extensionDescription": {
- "message": "Претрага Википедије на српском језику"
- },
- "searchUrl": {
- "message": "https://sr.wikipedia.org/wiki/Посебно:Претражи"
- },
- "searchForm": {
- "message": "https://sr.wikipedia.org/wiki/Посебно:Претражи?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://sr.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/sv-SE/messages.json b/browser/components/search/extensions/wikipedia/_locales/sv-SE/messages.json
deleted file mode 100644
index 1edc3db80d98..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/sv-SE/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (sv)"
- },
- "extensionDescription": {
- "message": "Wikipedia, den fria encyklopedin"
- },
- "searchUrl": {
- "message": "https://sv.wikipedia.org/wiki/Special:Sök"
- },
- "searchForm": {
- "message": "https://sv.wikipedia.org/wiki/Special:Sök?search={searchTerms}&sourceid=Moz…"
- },
- "suggestUrl": {
- "message": "https://sv.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ta/messages.json b/browser/components/search/extensions/wikipedia/_locales/ta/messages.json
deleted file mode 100644
index 54397603b028..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ta/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "விக்கிப்பீடியா (ta)"
- },
- "extensionDescription": {
- "message": "விக்கிப்பீடியா (ta)"
- },
- "searchUrl": {
- "message": "https://ta.wikipedia.org/wiki/சிறப்பு:Search"
- },
- "searchForm": {
- "message": "https://ta.wikipedia.org/wiki/சிறப்பு:Search?search={searchTerms}&sourceid=…"
- },
- "suggestUrl": {
- "message": "https://ta.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/te/messages.json b/browser/components/search/extensions/wikipedia/_locales/te/messages.json
deleted file mode 100644
index c474be12a76f..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/te/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "వికీపీడియా (te)"
- },
- "extensionDescription": {
- "message": "వికీపీడియా (te)"
- },
- "searchUrl": {
- "message": "https://te.wikipedia.org/wiki/ప్రత్యేక:అన్వేషణ"
- },
- "searchForm": {
- "message": "https://te.wikipedia.org/wiki/ప్రత్యేక:అన్వేషణ?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://te.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/th/messages.json b/browser/components/search/extensions/wikipedia/_locales/th/messages.json
deleted file mode 100644
index 3d6aeb07ca2c..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/th/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "วิกิพีเดีย"
- },
- "extensionDescription": {
- "message": "วิกิพีเดีย สารานุกรมเสรี"
- },
- "searchUrl": {
- "message": "https://th.wikipedia.org/wiki/พิเศษ:ค้นหา"
- },
- "searchForm": {
- "message": "https://th.wikipedia.org/wiki/พิเศษ:ค้นหา?search={searchTerms}&sourceid=Moz…"
- },
- "suggestUrl": {
- "message": "https://th.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/tl/messages.json b/browser/components/search/extensions/wikipedia/_locales/tl/messages.json
deleted file mode 100644
index d55b03131f97..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/tl/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (tl)"
- },
- "extensionDescription": {
- "message": "Wikipedia, ang malayang ensiklopedya"
- },
- "searchUrl": {
- "message": "https://tl.wikipedia.org/wiki/Natatangi:Maghanap"
- },
- "searchForm": {
- "message": "https://tl.wikipedia.org/wiki/Natatangi:Maghanap?search={searchTerms}&sourc…"
- },
- "suggestUrl": {
- "message": "https://tl.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/tr/messages.json b/browser/components/search/extensions/wikipedia/_locales/tr/messages.json
deleted file mode 100644
index 878b28ab68b2..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/tr/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (tr)"
- },
- "extensionDescription": {
- "message": "Vikipedi, özgür ansiklopedi"
- },
- "searchUrl": {
- "message": "https://tr.wikipedia.org/wiki/Özel:Ara"
- },
- "searchForm": {
- "message": "https://tr.wikipedia.org/wiki/Özel:Ara?search={searchTerms}&sourceid=Mozill…"
- },
- "suggestUrl": {
- "message": "https://tr.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/uk/messages.json b/browser/components/search/extensions/wikipedia/_locales/uk/messages.json
deleted file mode 100644
index 2749b86304bf..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/uk/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Вікіпедія (uk)"
- },
- "extensionDescription": {
- "message": "Вікіпедія, вільна енциклопедія"
- },
- "searchUrl": {
- "message": "https://uk.wikipedia.org/wiki/Спеціальна:Пошук"
- },
- "searchForm": {
- "message": "https://uk.wikipedia.org/wiki/Спеціальна:Пошук?search={searchTerms}&sourcei…"
- },
- "suggestUrl": {
- "message": "https://uk.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/ur/messages.json b/browser/components/search/extensions/wikipedia/_locales/ur/messages.json
deleted file mode 100644
index dcc87e0c853c..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/ur/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "ویکیپیڈیا (ur)"
- },
- "extensionDescription": {
- "message": "ویکیپیڈیا آزاد دائرۃ المعارف"
- },
- "searchUrl": {
- "message": "https://ur.wikipedia.org/wiki/خاص:تلاش"
- },
- "searchForm": {
- "message": "https://ur.wikipedia.org/wiki/خاص:تلاش?search={searchTerms}&sourceid=Mozill…"
- },
- "suggestUrl": {
- "message": "https://ur.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/uz/messages.json b/browser/components/search/extensions/wikipedia/_locales/uz/messages.json
deleted file mode 100644
index 89a8f2a89bca..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/uz/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Vikipediya (uz)"
- },
- "extensionDescription": {
- "message": "Vikipediya, ochiq ensiklopediya"
- },
- "searchUrl": {
- "message": "https://uz.wikipedia.org/wiki/Maxsus:Search"
- },
- "searchForm": {
- "message": "https://uz.wikipedia.org/wiki/Maxsus:Search?search={searchTerms}&sourceid=M…"
- },
- "suggestUrl": {
- "message": "https://uz.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/vi/messages.json b/browser/components/search/extensions/wikipedia/_locales/vi/messages.json
deleted file mode 100644
index c0844e4feb14..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/vi/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (vi)"
- },
- "extensionDescription": {
- "message": "Wikipedia, bách khoa toàn thư mở"
- },
- "searchUrl": {
- "message": "https://vi.wikipedia.org/wiki/Đặc_biệt:Tìm_kiếm"
- },
- "searchForm": {
- "message": "https://vi.wikipedia.org/wiki/Đặc_biệt:Tìm_kiếm?search={searchTerms}&source…"
- },
- "suggestUrl": {
- "message": "https://vi.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/wo/messages.json b/browser/components/search/extensions/wikipedia/_locales/wo/messages.json
deleted file mode 100644
index 7efde3b1d0f4..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/wo/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (wo)"
- },
- "extensionDescription": {
- "message": "Wikipedia, Jimbulang bu Ubbeeku bi"
- },
- "searchUrl": {
- "message": "https://wo.wikipedia.org/wiki/Jagleel:Ceet"
- },
- "searchForm": {
- "message": "https://wo.wikipedia.org/wiki/Jagleel:Ceet?search={searchTerms}&sourceid=Mo…"
- },
- "suggestUrl": {
- "message": "https://wo.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/zh-CN/messages.json b/browser/components/search/extensions/wikipedia/_locales/zh-CN/messages.json
deleted file mode 100644
index 29047565a243..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/zh-CN/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "维基百科"
- },
- "extensionDescription": {
- "message": "维基百科,自由的百科全书"
- },
- "searchUrl": {
- "message": "https://zh.wikipedia.org/wiki/Special:搜索"
- },
- "searchForm": {
- "message": "https://zh.wikipedia.org/wiki/Special:搜索?search={searchTerms}&sourceid=Mozi…"
- },
- "suggestUrl": {
- "message": "https://zh.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/_locales/zh-TW/messages.json b/browser/components/search/extensions/wikipedia/_locales/zh-TW/messages.json
deleted file mode 100644
index a0e8d880ea26..000000000000
--- a/browser/components/search/extensions/wikipedia/_locales/zh-TW/messages.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extensionName": {
- "message": "Wikipedia (zh)"
- },
- "extensionDescription": {
- "message": "維基百科,自由的百科全書"
- },
- "searchUrl": {
- "message": "https://zh.wikipedia.org/wiki/Special:搜索"
- },
- "searchForm": {
- "message": "https://zh.wikipedia.org/wiki/Special:搜索?search={searchTerms}&sourceid=Mozi…"
- },
- "suggestUrl": {
- "message": "https://zh.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}"
- },
- "searchUrlGetParams": {
- "message": "search={searchTerms}&sourceid=Mozilla-search&variant=zh-tw"
- }
-}
\ No newline at end of file
diff --git a/browser/components/search/extensions/wikipedia/manifest.json b/browser/components/search/extensions/wikipedia/manifest.json
index cd95d3aa9e1c..0af3b2a1c211 100644
--- a/browser/components/search/extensions/wikipedia/manifest.json
+++ b/browser/components/search/extensions/wikipedia/manifest.json
@@ -1,6 +1,6 @@
{
- "name": "__MSG_extensionName__",
- "description": "__MSG_extensionDescription__",
+ "name": "Wikipedia (en)",
+ "description": "Wikipedia, the Free Encyclopedia",
"manifest_version": 2,
"version": "1.1",
"applications": {
@@ -9,7 +9,6 @@
}
},
"hidden": true,
- "default_locale": "en",
"icons": {
"16": "favicon.ico"
},
@@ -19,11 +18,11 @@
"chrome_settings_overrides": {
"search_provider": {
"keyword": "@wikipedia",
- "name": "__MSG_extensionName__",
- "search_url": "__MSG_searchUrl__",
- "search_form": "__MSG_searchForm__",
- "suggest_url": "__MSG_suggestUrl__",
- "search_url_get_params": "__MSG_searchUrlGetParams__"
+ "name": "Wikipedia (en)",
+ "search_url": "https://en.wikipedia.org/wiki/Special:Search",
+ "search_form": "https://en.wikipedia.org/wiki/Special:Search?search={searchTerms}&sourceid=…",
+ "suggest_url": "https://en.wikipedia.org/w/api.php?action=opensearch&search={searchTerms}",
+ "search_url_get_params": "search={searchTerms}&sourceid=Mozilla-search"
}
}
}
diff --git a/browser/components/search/extensions/yahoo/favicon.ico b/browser/components/search/extensions/yahoo/favicon.ico
new file mode 100644
index 000000000000..9bd1d9f7c008
Binary files /dev/null and b/browser/components/search/extensions/yahoo/favicon.ico differ
diff --git a/browser/components/search/extensions/yahoo/manifest.json b/browser/components/search/extensions/yahoo/manifest.json
new file mode 100644
index 000000000000..e1f04a373c2e
--- /dev/null
+++ b/browser/components/search/extensions/yahoo/manifest.json
@@ -0,0 +1,28 @@
+{
+ "name": "Yahoo",
+ "description": "Yahoo Search",
+ "manifest_version": 2,
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "id": "yahoo(a)search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "icons": {
+ "16": "favicon.ico"
+ },
+ "web_accessible_resources": [
+ "favicon.ico"
+ ],
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "Yahoo",
+ "search_url": "https://search.yahoo.com/yhs/search",
+ "search_form": "https://search.yahoo.com/yhs/search?p={searchTerms}&ei=UTF-8&hspart=mozilla",
+ "search_url_get_params": "p={searchTerms}&ei=UTF-8&hspart=mozilla",
+ "suggest_url": "https://search.yahoo.com/sugg/ff",
+ "suggest_url_get_params": "output=fxjson&appid=ffd&command={searchTerms}"
+ }
+ }
+}
diff --git a/browser/components/search/extensions/youtube/favicon.ico b/browser/components/search/extensions/youtube/favicon.ico
new file mode 100644
index 000000000000..977887dbbb84
Binary files /dev/null and b/browser/components/search/extensions/youtube/favicon.ico differ
diff --git a/browser/components/search/extensions/youtube/manifest.json b/browser/components/search/extensions/youtube/manifest.json
new file mode 100644
index 000000000000..6fbf8745bac2
--- /dev/null
+++ b/browser/components/search/extensions/youtube/manifest.json
@@ -0,0 +1,26 @@
+{
+ "name": "YouTube",
+ "description": "YouTube - Videos",
+ "manifest_version": 2,
+ "version": "1.0",
+ "applications": {
+ "gecko": {
+ "id": "youtube(a)search.mozilla.org"
+ }
+ },
+ "hidden": true,
+ "icons": {
+ "16": "favicon.ico"
+ },
+ "web_accessible_resources": [
+ "favicon.ico"
+ ],
+ "chrome_settings_overrides": {
+ "search_provider": {
+ "name": "YouTube",
+ "search_url": "https://www.youtube.com/results?search_query={searchTerms}&search=Search",
+ "search_form": "https://www.youtube.com/index",
+ "suggest_url": "https://suggestqueries.google.com/complete/search?output=firefox&ds=yt&q={s…"
+ }
+ }
+}
\ No newline at end of file
diff --git a/tbb-tests/browser_tor_omnibox.js b/tbb-tests/browser_tor_omnibox.js
new file mode 100644
index 000000000000..e18b2a84a3d8
--- /dev/null
+++ b/tbb-tests/browser_tor_omnibox.js
@@ -0,0 +1,14 @@
+// # Test Tor Omnibox
+// Check what search engines are installed in the search box.
+
+function test() {
+ // Grab engine IDs.
+ let browserSearchService = Components.classes["@mozilla.org/browser/search-service;1"]
+ .getService(Components.interfaces.nsIBrowserSearchService),
+ engineIDs = browserSearchService.getEngines().map(e => e.identifier);
+
+ // Check that we have the correct engines installed, in the right order.
+ is(engineIDs[0], "ddg", "Default search engine is duckduckgo");
+ is(engineIDs[1], "youtube", "Secondary search engine is youtube");
+ is(engineIDs[2], "google", "Google is third search engine");
+}
diff --git a/toolkit/components/search/SearchService.jsm b/toolkit/components/search/SearchService.jsm
index 0edeba7b1489..7b78571c7b60 100644
--- a/toolkit/components/search/SearchService.jsm
+++ b/toolkit/components/search/SearchService.jsm
@@ -20,7 +20,6 @@ XPCOMUtils.defineLazyModuleGetters(this, {
Region: "resource://gre/modules/Region.jsm",
RemoteSettings: "resource://services-settings/remote-settings.js",
SearchEngine: "resource://gre/modules/SearchEngine.jsm",
- SearchEngineSelector: "resource://gre/modules/SearchEngineSelector.jsm",
SearchSettings: "resource://gre/modules/SearchSettings.jsm",
SearchStaticData: "resource://gre/modules/SearchStaticData.jsm",
SearchUtils: "resource://gre/modules/SearchUtils.jsm",
@@ -250,11 +249,6 @@ SearchService.prototype = {
Services.obs.addObserver(this, Region.REGION_TOPIC);
try {
- // Create the search engine selector.
- this._engineSelector = new SearchEngineSelector(
- this._handleConfigurationUpdated.bind(this)
- );
-
// See if we have a settings file so we don't have to parse a bunch of XML.
let settings = await this._settings.get();
@@ -1108,16 +1102,16 @@ SearchService.prototype = {
? "esr"
: AppConstants.MOZ_UPDATE_CHANNEL;
- let {
- engines,
- privateDefault,
- } = await this._engineSelector.fetchEngineConfiguration({
- locale,
- region,
- channel,
- experiment: gExperiment,
- distroID: SearchUtils.distroID,
- });
+ const engines = [
+ { webExtension: { id: "ddg(a)search.mozilla.org" } },
+ { webExtension: { id: "ddg-onion(a)search.mozilla.org" } },
+ { webExtension: { id: "google(a)search.mozilla.org" } },
+ { webExtension: { id: "yahoo(a)search.mozilla.org" } },
+ { webExtension: { id: "twitter(a)search.mozilla.org" } },
+ { webExtension: { id: "wikipedia(a)search.mozilla.org" } },
+ { webExtension: { id: "youtube(a)search.mozilla.org" } },
+ { webExtension: { id: "startpage(a)search.mozilla.org" } },
+ ];
for (let e of engines) {
if (!e.webExtension) {
@@ -1126,7 +1120,7 @@ SearchService.prototype = {
e.webExtension.locale = e.webExtension?.locale ?? SearchUtils.DEFAULT_TAG;
}
- return { engines, privateDefault };
+ return { engines, privateDefault: undefined };
},
_setDefaultAndOrdersFromSelector(engines, privateDefault) {
1
0