200 lines
11 KiB
Diff
200 lines
11 KiB
Diff
From: uazo <uazo@users.noreply.github.com>
|
|
Date: Tue, 14 Mar 2023 15:59:38 +0000
|
|
Subject: Disable privacy issues in password manager
|
|
|
|
Need: Add-cromite-flags-support.patch
|
|
License: GPL-2.0-or-later - https://spdx.org/licenses/GPL-2.0-or-later.html
|
|
---
|
|
chrome/android/java/AndroidManifest.xml | 9 ---------
|
|
.../password_store_android_backend_bridge_helper_impl.cc | 1 +
|
|
.../factories/password_receiver_service_factory.cc | 2 +-
|
|
.../factories/password_sender_service_factory.cc | 2 +-
|
|
.../generated_password_leak_detection_pref.cc | 3 +--
|
|
.../affiliations/core/browser/affiliation_backend.cc | 1 +
|
|
.../core/browser/affiliation_service_impl.cc | 4 ++++
|
|
components/affiliations/core/browser/facet_manager.cc | 4 ++++
|
|
.../affiliation/password_affiliation_source_adapter.cc | 4 ++++
|
|
.../leak_detection/leak_detection_check_factory_impl.cc | 5 +++++
|
|
.../browser/leak_detection/leak_detection_check_impl.cc | 3 +--
|
|
.../password_manager/core/browser/password_manager.cc | 4 ++--
|
|
.../Disable-privacy-issues-in-password-manager.inc | 1 +
|
|
13 files changed, 26 insertions(+), 17 deletions(-)
|
|
create mode 100644 cromite_flags/components/password_manager/core/browser/features/password_features_cc/Disable-privacy-issues-in-password-manager.inc
|
|
|
|
diff --git a/chrome/android/java/AndroidManifest.xml b/chrome/android/java/AndroidManifest.xml
|
|
--- a/chrome/android/java/AndroidManifest.xml
|
|
+++ b/chrome/android/java/AndroidManifest.xml
|
|
@@ -499,15 +499,6 @@ by a child template that "extends" this file.
|
|
android:excludeFromRecents="true"
|
|
android:exported="false" />
|
|
|
|
- <!-- Phishing Protection related -->
|
|
- <receiver android:name="org.chromium.chrome.browser.safe_browsing.PasswordProtectionBroadcastReceiver"
|
|
- android:exported="true"
|
|
- android:permission="com.google.android.gms.permission.INTERNAL_BROADCAST">
|
|
- <intent-filter>
|
|
- <action android:name="com.android.chrome.safe_browsing.LOGIN" />
|
|
- </intent-filter>
|
|
- </receiver>
|
|
-
|
|
<!-- Upgrade related -->
|
|
<receiver android:name="org.chromium.chrome.browser.upgrade.PackageReplacedBroadcastReceiver"
|
|
android:exported="false">
|
|
diff --git a/chrome/browser/password_manager/android/password_store_android_backend_bridge_helper_impl.cc b/chrome/browser/password_manager/android/password_store_android_backend_bridge_helper_impl.cc
|
|
--- a/chrome/browser/password_manager/android/password_store_android_backend_bridge_helper_impl.cc
|
|
+++ b/chrome/browser/password_manager/android/password_store_android_backend_bridge_helper_impl.cc
|
|
@@ -101,6 +101,7 @@ bool PasswordStoreAndroidBackendBridgeHelperImpl::
|
|
|
|
bool PasswordStoreAndroidBackendBridgeHelperImpl::
|
|
CanUseGetAllLoginsWithBrandingInfoAPI() {
|
|
+ if ((true)) return false;
|
|
int current_gms_core_version;
|
|
if (!base::StringToInt(base::android::device_info::gms_version_code(),
|
|
¤t_gms_core_version)) {
|
|
diff --git a/chrome/browser/password_manager/factories/password_receiver_service_factory.cc b/chrome/browser/password_manager/factories/password_receiver_service_factory.cc
|
|
--- a/chrome/browser/password_manager/factories/password_receiver_service_factory.cc
|
|
+++ b/chrome/browser/password_manager/factories/password_receiver_service_factory.cc
|
|
@@ -55,7 +55,7 @@ PasswordReceiverServiceFactory::BuildServiceInstanceForBrowserContext(
|
|
content::BrowserContext* context) const {
|
|
// Password receiving on Android is handled in GMSCore, and hence no service
|
|
// should be instantiated.
|
|
-#if BUILDFLAG(IS_ANDROID)
|
|
+#if true
|
|
return nullptr;
|
|
#else
|
|
|
|
diff --git a/chrome/browser/password_manager/factories/password_sender_service_factory.cc b/chrome/browser/password_manager/factories/password_sender_service_factory.cc
|
|
--- a/chrome/browser/password_manager/factories/password_sender_service_factory.cc
|
|
+++ b/chrome/browser/password_manager/factories/password_sender_service_factory.cc
|
|
@@ -50,7 +50,7 @@ PasswordSenderServiceFactory::BuildServiceInstanceForBrowserContext(
|
|
content::BrowserContext* context) const {
|
|
// Password sending on Android is handled in GMSCore, and hence no service
|
|
// should be instantiated.
|
|
-#if BUILDFLAG(IS_ANDROID)
|
|
+#if true
|
|
return nullptr;
|
|
#else
|
|
|
|
diff --git a/chrome/browser/password_manager/generated_password_leak_detection_pref.cc b/chrome/browser/password_manager/generated_password_leak_detection_pref.cc
|
|
--- a/chrome/browser/password_manager/generated_password_leak_detection_pref.cc
|
|
+++ b/chrome/browser/password_manager/generated_password_leak_detection_pref.cc
|
|
@@ -22,8 +22,7 @@ namespace {
|
|
|
|
// Returns whether the user can use the leak detection feature.
|
|
bool IsUserAllowedToUseLeakDetection(Profile* profile) {
|
|
- return !profile->IsGuestSession() &&
|
|
- IdentityManagerFactory::GetForProfileIfExists(profile);
|
|
+ return false;
|
|
}
|
|
|
|
} // namespace
|
|
diff --git a/components/affiliations/core/browser/affiliation_backend.cc b/components/affiliations/core/browser/affiliation_backend.cc
|
|
--- a/components/affiliations/core/browser/affiliation_backend.cc
|
|
+++ b/components/affiliations/core/browser/affiliation_backend.cc
|
|
@@ -391,6 +391,7 @@ void AffiliationBackend::OnFetchFinished(
|
|
}
|
|
|
|
bool AffiliationBackend::OnCanSendNetworkRequest() {
|
|
+ if ((true)) return false;
|
|
std::vector<FacetURI> requested_facet_uris;
|
|
for (const auto& facet_manager_pair : facet_managers_) {
|
|
if (facet_manager_pair.second->DoesRequireFetch())
|
|
diff --git a/components/affiliations/core/browser/affiliation_service_impl.cc b/components/affiliations/core/browser/affiliation_service_impl.cc
|
|
--- a/components/affiliations/core/browser/affiliation_service_impl.cc
|
|
+++ b/components/affiliations/core/browser/affiliation_service_impl.cc
|
|
@@ -314,6 +314,10 @@ void AffiliationServiceImpl::GetPSLExtensions(
|
|
void AffiliationServiceImpl::UpdateAffiliationsAndBranding(
|
|
const std::vector<FacetURI>& facets,
|
|
base::OnceClosure callback) {
|
|
+ if ((true)) {
|
|
+ std::move(callback).Run();
|
|
+ return;
|
|
+ }
|
|
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
|
DCHECK(backend_);
|
|
auto callback_in_main_sequence =
|
|
diff --git a/components/affiliations/core/browser/facet_manager.cc b/components/affiliations/core/browser/facet_manager.cc
|
|
--- a/components/affiliations/core/browser/facet_manager.cc
|
|
+++ b/components/affiliations/core/browser/facet_manager.cc
|
|
@@ -111,6 +111,10 @@ void FacetManager::GetAffiliationsAndBranding(
|
|
RequestInfo request_info;
|
|
request_info.callback = std::move(callback);
|
|
request_info.callback_task_runner = callback_task_runner;
|
|
+ if ((true)) {
|
|
+ ServeRequestWithFailure(std::move(request_info));
|
|
+ return;
|
|
+ }
|
|
if (IsCachedDataFresh()) {
|
|
AffiliatedFacetsWithUpdateTime affiliation;
|
|
if (!backend_->ReadAffiliationsAndBrandingFromDatabase(facet_uri_,
|
|
diff --git a/components/password_manager/core/browser/affiliation/password_affiliation_source_adapter.cc b/components/password_manager/core/browser/affiliation/password_affiliation_source_adapter.cc
|
|
--- a/components/password_manager/core/browser/affiliation/password_affiliation_source_adapter.cc
|
|
+++ b/components/password_manager/core/browser/affiliation/password_affiliation_source_adapter.cc
|
|
@@ -27,6 +27,10 @@ PasswordAffiliationSourceAdapter::~PasswordAffiliationSourceAdapter() = default;
|
|
|
|
void PasswordAffiliationSourceAdapter::GetFacets(
|
|
AffiliationSource::ResultCallback response_callback) {
|
|
+ if (((true))) {
|
|
+ std::move(response_callback).Run({});
|
|
+ return;
|
|
+ }
|
|
on_password_forms_received_callback_ = std::move(response_callback);
|
|
store_->GetAllLogins(weak_ptr_factory_.GetWeakPtr());
|
|
}
|
|
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc b/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc
|
|
--- a/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc
|
|
+++ b/components/password_manager/core/browser/leak_detection/leak_detection_check_factory_impl.cc
|
|
@@ -45,6 +45,11 @@ LeakDetectionCheckFactoryImpl::TryCreateLeakCheck(
|
|
version_info::Channel channel) const {
|
|
CHECK(identity_manager);
|
|
|
|
+ if ((true)) {
|
|
+ delegate->OnError(LeakDetectionError::kNotSignIn);
|
|
+ return nullptr;
|
|
+ }
|
|
+
|
|
return std::make_unique<LeakDetectionCheckImpl>(
|
|
delegate, identity_manager, std::move(url_loader_factory),
|
|
GetAPIKey(LeakDetectionCheckImpl::HasAccountForRequest(identity_manager),
|
|
diff --git a/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc b/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
|
|
--- a/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
|
|
+++ b/components/password_manager/core/browser/leak_detection/leak_detection_check_impl.cc
|
|
@@ -195,8 +195,7 @@ bool LeakDetectionCheckImpl::HasAccountForRequest(
|
|
const signin::IdentityManager* identity_manager) {
|
|
// On desktop HasPrimaryAccount(signin::ConsentLevel::kSignin) will
|
|
// always return something if the user is signed in.
|
|
- return identity_manager &&
|
|
- identity_manager->HasPrimaryAccount(signin::ConsentLevel::kSignin);
|
|
+ return false;
|
|
}
|
|
|
|
void LeakDetectionCheckImpl::Start(LeakDetectionInitiator initiator,
|
|
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
|
|
--- a/components/password_manager/core/browser/password_manager.cc
|
|
+++ b/components/password_manager/core/browser/password_manager.cc
|
|
@@ -603,7 +603,7 @@ void PasswordManager::RegisterProfilePrefs(
|
|
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) || \
|
|
BUILDFLAG(IS_CHROMEOS)
|
|
registry->RegisterBooleanPref(prefs::kBiometricAuthenticationBeforeFilling,
|
|
- false);
|
|
+ true);
|
|
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID) ||
|
|
// BUILDFLAG(IS_CHROMEOS)
|
|
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS) // Desktop
|
|
@@ -635,7 +635,7 @@ void PasswordManager::RegisterProfilePrefs(
|
|
registry->RegisterBooleanPref(prefs::kAccountStoreMigratedToOSCryptAsync,
|
|
false);
|
|
registry->RegisterBooleanPref(
|
|
- prefs::kAutomaticPasskeyUpgrades, true,
|
|
+ prefs::kAutomaticPasskeyUpgrades, false,
|
|
user_prefs::PrefRegistrySyncable::SYNCABLE_PRIORITY_PREF);
|
|
registry->RegisterTimePref(
|
|
prefs::kAccountStoreBackupPasswordCleaningLastTimestamp, base::Time());
|
|
diff --git a/cromite_flags/components/password_manager/core/browser/features/password_features_cc/Disable-privacy-issues-in-password-manager.inc b/cromite_flags/components/password_manager/core/browser/features/password_features_cc/Disable-privacy-issues-in-password-manager.inc
|
|
new file mode 100644
|
|
--- /dev/null
|
|
+++ b/cromite_flags/components/password_manager/core/browser/features/password_features_cc/Disable-privacy-issues-in-password-manager.inc
|
|
@@ -0,0 +1 @@
|
|
+SET_CROMITE_FEATURE_ENABLED(kFillOnAccountSelect);
|
|
--
|