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

Unified Diff: components/password_manager/core/browser/password_manager.cc

Issue 545433003: Don't allow the empty new password to overwrite the existing one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added comments Created 6 years, 3 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
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/password_manager/core/browser/password_manager.cc
diff --git a/components/password_manager/core/browser/password_manager.cc b/components/password_manager/core/browser/password_manager.cc
index be903b8f4d2f642e3314a13f78edbcca58b18d57..01213bb818fa21e91f3e9fc686d37891494326ef 100644
--- a/components/password_manager/core/browser/password_manager.cc
+++ b/components/password_manager/core/browser/password_manager.cc
@@ -173,7 +173,8 @@ void PasswordManager::ProvisionallySavePassword(const PasswordForm& form) {
}
// No password to save? Then don't.
- if (form.password_value.empty() && form.new_password_value.empty()) {
+ if ((form.new_password_element.empty() && form.password_value.empty()) ||
+ (!form.new_password_element.empty() && form.new_password_value.empty())) {
RecordFailure(EMPTY_PASSWORD, form.origin.host(), logger.get());
return;
}
« no previous file with comments | « no previous file | components/password_manager/core/browser/password_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698