Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(605)

Unified Diff: components/autofill/core/common/password_form_fill_data.cc

Issue 2736393003: Clear password values before sending them to the renderer process. (Closed)
Patch Set: Addressed comments Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: components/autofill/core/common/password_form_fill_data.cc
diff --git a/components/autofill/core/common/password_form_fill_data.cc b/components/autofill/core/common/password_form_fill_data.cc
index 9b1383046e093a10761cb08286e6735f047c4bfc..a75d9c5e3cac79f8def31eabcda66818e77f9434 100644
--- a/components/autofill/core/common/password_form_fill_data.cc
+++ b/components/autofill/core/common/password_form_fill_data.cc
@@ -90,4 +90,13 @@ void InitPasswordFormFillData(
}
}
+PasswordFormFillData ClearPasswordValues(const PasswordFormFillData& data) {
+ PasswordFormFillData result(data);
+ if (result.wait_for_username)
+ result.password_field.value.clear();
+ for (auto& credentials : result.additional_logins)
+ credentials.second.password.clear();
+ return result;
+}
+
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698