mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Try harder to identify the username used if the user have multiple entries for a website. This should help prevent false-positive banners when the user did *not* change their password, especially on multi-step login forms.
This commit is contained in:
parent
2ea0fe2b97
commit
603e1d4def
1 changed files with 9 additions and 0 deletions
|
|
@ -158,6 +158,15 @@ kpxcForm.onSubmit = async function(e) {
|
|||
} else if (kpxc.credentials.length === 1) {
|
||||
// Single entry found for the page, use the username of it instead of an empty one
|
||||
usernameValue = kpxc.credentials[0].login;
|
||||
} else {
|
||||
// Multiple entries found for the page, try to find out which one might have been used
|
||||
const pageUuid = await sendMessage('page_get_login_id');
|
||||
if (pageUuid) {
|
||||
const credential = kpxc.credentials.find(c => c.uuid === pageUuid);
|
||||
if (credential) {
|
||||
usernameValue = credential.login;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Check if the form has three password fields -> a possible password change form
|
||||
|
|
|
|||
Loading…
Reference in a new issue