diff options
-rwxr-xr-x | keepassxc-browser/content/keepassxc-browser.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/keepassxc-browser/content/keepassxc-browser.js b/keepassxc-browser/content/keepassxc-browser.js index 13ea7e6..ee38c4f 100755 --- a/keepassxc-browser/content/keepassxc-browser.js +++ b/keepassxc-browser/content/keepassxc-browser.js @@ -155,6 +155,10 @@ kpxcForm.getCredentialFieldsFromForm = function(form) { // Get the form submit button instead if action URL is same as the page itself kpxcForm.getFormSubmitButton = function(form) { + if (!form.action || typeof form.action !== 'string') { + return; + } + const action = kpxc.submitUrl || form.action; // Special handling for accounts.google.com. The submit button is outside the form. @@ -221,6 +225,10 @@ kpxcForm.getNewPassword = function(passwordInputs = []) { // Initializes form and attaches the submit button to our own callback kpxcForm.init = function(form, credentialFields) { + if (!form.action || typeof form.action !== 'string') { + return; + } + if (!kpxcForm.formIdentified(form) && (credentialFields.password || credentialFields.username) || form.action.startsWith(kpxcSites.googlePasswordFormUrl)) { kpxcForm.saveForm(form, credentialFields); |