mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1724 from keepassxreboot/fix/hide_duplicate_totp_entry
Hide duplicate TOTP entry
This commit is contained in:
commit
4a6a99dcb9
1 changed files with 8 additions and 0 deletions
|
|
@ -388,6 +388,14 @@ kpxc.initLoginPopup = function() {
|
|||
const loginItems = [];
|
||||
for (let i = 0; i < kpxc.credentials.length; i++) {
|
||||
const loginItem = getLoginItem(kpxc.credentials[i], showGroupNameInAutocomplete, i);
|
||||
|
||||
// Ignore a duplicate entry if the password is empty, but there's already a similar entry with a password.
|
||||
// An usual use case with TOTP in a separate database.
|
||||
const similarEntryFound = kpxc.credentials.some(c => c.password !== '' && c.login === loginItem.login);
|
||||
if (kpxc.credentials[i].password === '' && similarEntryFound) {
|
||||
continue;
|
||||
}
|
||||
|
||||
loginItems.push(loginItem);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue