-
Notifications
You must be signed in to change notification settings - Fork 873
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed Saved Passwords section in settings is empty #5656
Conversation
5450740
to
02809ee
Compare
Filed issue to crbug.com - https://bugs.chromium.org/p/chromium/issues/detail?id=1086348 |
02809ee
to
65dcaef
Compare
return ENCRYPTION_RESULT_SUCCESS; | ||
|
||
- return OSCrypt::IsEncryptionAvailable() && IsUsingCleanupMechanism() | ||
+ return OSCrypt::IsEncryptionAvailable() /* && IsUsingCleanupMechanism() */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why aren't we using kDeleteCorruptedPasswords to fix this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok - Using kDeleteCorruptedPasswords
could work on macOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bridiver Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think using kDeleteCorruptedPasswords
by default seems dangerous.
Brave will clear all passwords if decryption is failed temporarily.
How about using my initial way?
f707dcc
to
c957228
Compare
EncryptionResult result = InitPasswordFormFromStatement( | ||
*statement, /*decrypt_and_fill_password_value=*/true, &primary_key, | ||
new_form.get()); | ||
+ if (result == ENCRYPTION_RESULT_SERVICE_FAILURE) result = ENCRYPTION_RESULT_ITEM_FAILURE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please convert to standard patch format BRAVE_STATEMENT_TO_FORMS
Some users reported that Saved Passwords sections is empty but passwords are autofilled to website's password form on linux and macOS. I think this can happen if user insert/update new password entries after login db encryption is corrupted. However, currently user can't anything even if current login db has decryptable entries. The reason is LoginDatabase::StatementToForms() gives empty password entry when any entry in login db has decryption failure on linux and macOS. To fix this, ENCRYPTION_RESULT_ITEM_FAILURE is use for individual decryption failure instead of ENCRYPTION_RESULT_SERVICE_FAILURE. If ENCRYPTION_RESULT_SERVICE_FAILURE is returned, LoginDatabase::StatementToForms() assumes all other entries will have decrypt failure. However, db could have decryptable entries even if current entry is failed to decrypt.
c957228
to
ba2de6f
Compare
Some users reported that Saved Passwords sections is empty but passwords are autofilled
to website's password form on linux and macOS.
I think this can happen if user insert/update new password entries after login db encryption
is corrupted.
However, currently user can't anything even if current login db has decryptable entries.
The reason is LoginDatabase::StatementToForms() gives empty password entry when any entry in
login db has decryption failure on linux and macOS.
To fix this, ENCRYPTION_RESULT_ITEM_FAILURE is used for individual decryption failure
instead of ENCRYPTION_RESULT_SERVICE_FAILURE.
If ENCRYPTION_RESULT_SERVICE_FAILURE is returned, LoginDatabase::StatementToForms() assumes
all other entries will have decrypt failure. However, db could have decryptable entries
even if current entry is failed to decrypt.
Resolves brave/brave-browser#3196
Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Login Data
in user's profile folder to Brave's folderReviewer Checklist:
After-merge Checklist:
changes has landed on.