Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc-browser.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Vänttinen <sami.vanttinen@protonmail.com>2020-11-07 18:21:03 +0300
committerGitHub <noreply@github.com>2020-11-07 18:21:03 +0300
commit376510c3f8ba351f64ec5eb6e62b23c353a51a01 (patch)
tree765ba434459b97b4592f8c6098097d4de3dd02d4 /keepassxc-browser
parentc273b3b9dd17eff41bef5471d72da8354ac64ebe (diff)
parentbc2a1fcd12f9af60f68f87870450ef2bc5792bb2 (diff)
Merge pull request #1099 from keepassxreboot/fix/extra_check_for_form_action
Add extra checks for form.action
Diffstat (limited to 'keepassxc-browser')
-rwxr-xr-xkeepassxc-browser/content/keepassxc-browser.js8
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);