Merge pull request #2585 from keepassxreboot/fix/global_autotype_trigger_search_param

Fix Global Auto-Type search param
This commit is contained in:
Sami Vänttinen 2025-06-19 20:24:20 +03:00 committed by GitHub
commit cd9c4e92a9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 2 deletions

View file

@ -582,7 +582,7 @@ keepass.requestAutotype = async function(tab, args = []) {
const kpAction = kpActions.REQUEST_AUTOTYPE;
const nonce = keepassClient.getNonce();
const search = page.getTopLevelDomainFromUrl(args[0]);
const search = await page.getBaseDomainFromUrl(args[0]);
const messageData = {
action: kpAction,

View file

@ -1003,7 +1003,10 @@ browser.runtime.onMessage.addListener(async function(req, sender) {
} else if (req.action === 'show_password_generator') {
kpxcPasswordGenerator.showPasswordGenerator();
} else if (req.action === 'request_autotype') {
sendMessage('request_autotype', [ window.location.hostname ]);
// All frames can perform this. Ignore iframes that are not allowed.
if (await isIframeAllowed()) {
sendMessage('request_autotype', [ window.location.hostname ]);
}
}
}
});