From bd44d20ee183e4cda0d96bb73d441e496a32cb81 Mon Sep 17 00:00:00 2001 From: AKORA <65976562+A-K-O-R-A@users.noreply.github.com> Date: Sun, 6 Oct 2024 21:01:32 +0200 Subject: [PATCH] Automatically submit login forms when site preference override for the setting is present --- keepassxc-browser/content/fill.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/keepassxc-browser/content/fill.js b/keepassxc-browser/content/fill.js index 7bfe8d8..30d8cc4 100644 --- a/keepassxc-browser/content/fill.js +++ b/keepassxc-browser/content/fill.js @@ -316,7 +316,16 @@ kpxcFill.fillInStringFields = function(fields, stringFields) { // Performs Auto-Submit. If filling single credentials is enabled, a 5 second timeout will be needed for fill kpxcFill.performAutoSubmit = async function(combination, skipAutoSubmit) { - if (!kpxc.settings.autoSubmit) { + // Check for site preference overrides + const sitePreference = kpxc.retrieveSitePreference(); + let autoSubmitSitePreference = false; + if (sitePreference !== null && sitePreference !== undefined) { + if (sitePreference.autoSubmit === true || sitePreference.autoSubmit === false) { + autoSubmitSitePreference = sitePreference.autoSubmit; + } + } + + if (!kpxc.settings.autoSubmit && !autoSubmitSitePreference) { return; }