From a610ff70bd1a93793851aad02d1cb77872bc2e45 Mon Sep 17 00:00:00 2001 From: varjolintu Date: Mon, 15 Sep 2025 20:24:01 +0300 Subject: [PATCH] Fix filling relevant credential entries --- keepassxc-browser/background/page.js | 4 ++-- keepassxc-browser/content/keepassxc-browser.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/keepassxc-browser/background/page.js b/keepassxc-browser/background/page.js index 06d7880..e9446f5 100755 --- a/keepassxc-browser/background/page.js +++ b/keepassxc-browser/background/page.js @@ -257,11 +257,11 @@ page.retrieveCredentials = async function(tab, args = []) { return credentials; }; -page.getLoginId = async function(tab) { +page.getLoginId = async function(tab, returnSingle = true) { const currentTab = page.tabs[tab.id]; // If there's only one credential available and loginId is not set - if (currentTab && !currentTab.loginId && currentTab.credentials.length === 1) { + if (currentTab && returnSingle && !currentTab.loginId && currentTab.credentials.length === 1) { return currentTab.credentials[0].uuid; } diff --git a/keepassxc-browser/content/keepassxc-browser.js b/keepassxc-browser/content/keepassxc-browser.js index 3c528ec..2351990 100755 --- a/keepassxc-browser/content/keepassxc-browser.js +++ b/keepassxc-browser/content/keepassxc-browser.js @@ -519,7 +519,7 @@ kpxc.prepareCredentials = async function() { kpxc.initAutocomplete(); if (kpxc.settings.autoFillRelevantCredential) { - const pageUuid = await sendMessage('page_get_login_id'); + const pageUuid = await sendMessage('page_get_login_id', false); if (pageUuid) { const relevantCredential = kpxc.credentials.find(c => c.uuid === pageUuid); const combination = kpxc.combinations?.at(-1);