#514 Introduce Chrome web store protection

The amount of information sent is minimized without disabling
the ability to install extensions (which is under user control)
It became possible to activate the autoupdate of extensions by sending the minimum of values.
Installation with the chrome web store is allowed, but the website
by default cannot retrieve the list of installed extensions and their status (under flag)
All http calls related to requesting and downloading updates are cookie-free,
but the ip and the list of extensions are traceable, that information cannot be omitted.
Auto-update is disabled by default: it is possible to activate it with chrome://extensions/
This commit is contained in:
Carmelo Messina
2023-12-28 16:53:56 +01:00
parent dfc2b09225
commit 860536f6f4
5 changed files with 1119 additions and 131 deletions
+1 -4
View File
@@ -23,7 +23,6 @@ Battery-API-return-nothing.patch
updater-disable-updater-pings.patch
Disable-omission-of-URL-elements-in-Omnibox.patch
Modify-default-preferences.patch
Do-not-hide-component-extensions.patch
Do-not-store-passwords-by-default.patch
Disable-NTP-remote-suggestions-by-default.patch
Disable-references-to-fonts.googleapis.com.patch
@@ -69,7 +68,6 @@ profile-resetter-disable-send-settings.patch
Do-not-build-API-keys-infobar.patch
autofill-miscellaneous.patch
Enable-native-Android-autofill.patch
first_run-deactivate-autoupdate-globally.patch
translate-disable-fetching-of-languages-from-server.patch
Offer-builtin-autocomplete-for-chrome-flags.patch
Use-4-tile-rows-never-show-logo.patch
@@ -189,7 +187,6 @@ Add-kill-switch-for-unsupported-clangd-flags.patch
00WIN-enable-file-system-access-blocklist.patch
00WIN-Disable-TabHoverCard-images.patch
00WIN-Fix-log-to-file.patch
00WIN-minimum-data-to-enable-install-extensions.patch
00WIN-Disable-updater.patch
00WIN-Disable-first-run.patch
00WIN-Add-some-prefs-to-secure-preferences.patch
@@ -276,13 +273,13 @@ Timezone-customization.patch
00Add-cromite-flags-support.patch
00Add-PartialLowEndModeOnMidRangeDevices-flag.patch
00Use-list-mode-for-tab-switcher.patch
00Chrome-web-store-protection.patch
00Temp-PerformanceNavigationTiming-privacy-fix.patch
00Temp-disable-predictive-back-gesture.patch
00TEMP-Add-a-log-to-track-strange-behavior.patch
00Temp-guard-FileSystemAccessPersistentPermissions.patch
00Fix-chromium-build-bugs.patch
eyeo-beta-118.0.5993.48-base.patch
eyeo-beta-118.0.5993.48-chrome_integration.patch
eyeo-beta-118.0.5993.48-android_api.patch
File diff suppressed because it is too large Load Diff
@@ -1,72 +0,0 @@
From: uazo <uazo@users.noreply.github.com>
Date: Sat, 15 Apr 2023 10:25:33 +0000
Subject: WIN minimum data to enable install extensions
The amount of information sent is minimized without disabling
the ability to install extensions (which is under user control)
---
chrome/browser/extensions/webstore_install_helper.cc | 2 +-
chrome/browser/extensions/webstore_installer.cc | 2 +-
.../update_client/chrome_update_query_params_delegate.cc | 8 ++++----
components/update_client/update_query_params.cc | 5 ++---
4 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/chrome/browser/extensions/webstore_install_helper.cc b/chrome/browser/extensions/webstore_install_helper.cc
--- a/chrome/browser/extensions/webstore_install_helper.cc
+++ b/chrome/browser/extensions/webstore_install_helper.cc
@@ -46,7 +46,7 @@ void WebstoreInstallHelper::Start(
data_decoder::DataDecoder::ParseJsonIsolated(
manifest_, base::BindOnce(&WebstoreInstallHelper::OnJSONParsed, this));
- if (icon_url_.is_empty()) {
+ if ((true) || icon_url_.is_empty()) {
icon_decode_complete_ = true;
} else {
// No existing |icon_fetcher_| to avoid unbalanced AddRef().
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -624,7 +624,7 @@ void WebstoreInstaller::StartDownload(const std::string& extension_id,
download_url_, render_process_host_id, render_frame_host->GetRoutingID(),
traffic_annotation));
params->set_file_path(file);
- if (controller.GetVisibleEntry()) {
+ if ((false) && controller.GetVisibleEntry()) {
content::Referrer referrer = content::Referrer::SanitizeForRequest(
download_url_,
content::Referrer(controller.GetVisibleEntry()->GetURL(),
diff --git a/chrome/browser/update_client/chrome_update_query_params_delegate.cc b/chrome/browser/update_client/chrome_update_query_params_delegate.cc
--- a/chrome/browser/update_client/chrome_update_query_params_delegate.cc
+++ b/chrome/browser/update_client/chrome_update_query_params_delegate.cc
@@ -30,10 +30,10 @@ ChromeUpdateQueryParamsDelegate::GetInstance() {
}
std::string ChromeUpdateQueryParamsDelegate::GetExtraParams() {
- return base::StrCat({"&prodchannel=",
- chrome::GetChannelName(chrome::WithExtendedStable(true)),
- "&prodversion=", version_info::GetVersionNumber(),
- "&lang=", GetLang()});
+ return base::StrCat({
+ "&prodversion=",
+ version_info::GetMajorVersionNumber().c_str(),
+ ".0.0.0"});
}
// static
diff --git a/components/update_client/update_query_params.cc b/components/update_client/update_query_params.cc
--- a/components/update_client/update_query_params.cc
+++ b/components/update_client/update_query_params.cc
@@ -88,9 +88,8 @@ UpdateQueryParamsDelegate* g_delegate = nullptr;
// static
std::string UpdateQueryParams::Get(ProdId prod) {
return base::StringPrintf(
- "os=%s&arch=%s&os_arch=%s&nacl_arch=%s&prod=%s%s&acceptformat=crx3,puff",
- kOs, kArch, base::SysInfo().OperatingSystemArchitecture().c_str(),
- GetNaclArch(), GetProdIdString(prod),
+ "prod=%s%s&acceptformat=crx3",
+ GetProdIdString(prod),
g_delegate ? g_delegate->GetExtraParams().c_str() : "");
}
--
2.25.1
@@ -1,24 +0,0 @@
From: csagan5 <32685696+csagan5@users.noreply.github.com>
Date: Thu, 12 Oct 2017 08:09:24 +0200
Subject: Do not hide component extensions
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
extensions/browser/api/management/management_api.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/extensions/browser/api/management/management_api.cc b/extensions/browser/api/management/management_api.cc
--- a/extensions/browser/api/management/management_api.cc
+++ b/extensions/browser/api/management/management_api.cc
@@ -75,7 +75,8 @@ AutoConfirmForTest auto_confirm_for_test = DO_NOT_SKIP;
// Returns true if the extension should be exposed via the chrome.management
// API.
bool ShouldExposeViaManagementAPI(const Extension& extension) {
- return !Manifest::IsComponentLocation(extension.location());
+ // do not hide component extensions
+ return true;
}
std::vector<std::string> CreateWarningsList(const Extension* extension) {
--
2.25.1
@@ -1,31 +0,0 @@
From: Jan Engelhardt <jengelh@inai.de>
Date: Sat, 13 Sep 2014 17:12:43 +0200
Subject: first_run: deactivate autoupdate globally
We currently do not have any update service infrastructure in place
(i.e. on our webserver), and sending update requests to Google also
sounds meh (wrong provider, after all).
Also, there is no tunable in chrome://settings (or similar) yet to
turn it back on.
License: GPL-3.0-only - https://spdx.org/licenses/GPL-3.0-only.html
---
chrome/browser/extensions/extension_system_impl.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/chrome/browser/extensions/extension_system_impl.cc b/chrome/browser/extensions/extension_system_impl.cc
--- a/chrome/browser/extensions/extension_system_impl.cc
+++ b/chrome/browser/extensions/extension_system_impl.cc
@@ -199,8 +199,7 @@ void ExtensionSystemImpl::Shared::Init(bool extensions_enabled) {
user_script_manager_ = std::make_unique<UserScriptManager>(profile_);
- bool autoupdate_enabled =
- !profile_->IsGuestSession() && !profile_->IsSystemProfile();
+ bool autoupdate_enabled = false;
#if BUILDFLAG(IS_CHROMEOS_ASH)
if (!extensions_enabled ||
ash::ProfileHelper::IsLockScreenAppProfile(profile_)) {
--
2.25.1