mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #153 from keepassxreboot/credential_request_fix
Credential retrieval fix
This commit is contained in:
commit
bf190d1faf
3 changed files with 15 additions and 1 deletions
|
|
@ -159,6 +159,9 @@ kpxcEvent.onReconnect = function(callback, tab) {
|
|||
// Add a small timeout after reconnecting. Just to make sure. It's not pretty, I know :(
|
||||
setTimeout(() => {
|
||||
keepass.reconnect(callback, tab).then((configured) => {
|
||||
browser.tabs.sendMessage(tab.id, {
|
||||
action: 'redetect_fields'
|
||||
});
|
||||
kpxcEvent.showStatus(configured, tab, callback);
|
||||
});
|
||||
}, 500);
|
||||
|
|
|
|||
|
|
@ -839,6 +839,17 @@ keepass.onNativeMessage = function(response) {
|
|||
keepass.testAssociation((associationResponse) => {
|
||||
keepass.isConfigured().then((configured) => {
|
||||
keepass.updatePopup(configured ? 'normal' : 'cross');
|
||||
|
||||
// Send message to content script
|
||||
browser.tabs.query({ active: true, currentWindow: true }).then((tabs) => {
|
||||
if (tabs.length) {
|
||||
browser.tabs.sendMessage(tabs[0].id, {
|
||||
action: 'check_database_hash',
|
||||
hash: {old: keepass.previousDatabaseHash, new: keepass.databaseHash}
|
||||
});
|
||||
keepass.previousDatabaseHash = keepass.databaseHash;
|
||||
}
|
||||
});
|
||||
});
|
||||
}, null);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1207,6 +1207,7 @@ cip.detectDatabaseChange = function(response) {
|
|||
args: [ true ] // Set polling to true, this is an internal function call
|
||||
});
|
||||
} else if (response.new !== 'no-hash' && response.new !== response.old) {
|
||||
_called.retrieveCredentials = false;
|
||||
browser.runtime.sendMessage({
|
||||
action: 'load_settings',
|
||||
}).then((response) => {
|
||||
|
|
@ -1262,7 +1263,6 @@ cip.initCredentialFields = function(forceCall) {
|
|||
}
|
||||
|
||||
if (cip.settings.autoRetrieveCredentials && _called.retrieveCredentials === false && (cip.url && cip.submitUrl)) {
|
||||
_called.retrieveCredentials = true;
|
||||
browser.runtime.sendMessage({
|
||||
action: 'retrieve_credentials',
|
||||
args: [ cip.url, cip.submitUrl ]
|
||||
|
|
|
|||
Loading…
Reference in a new issue