From 89cc1bb40d7be1d5771e110aecedc81ff3bbd0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20V=C3=A4nttinen?= Date: Sat, 7 Feb 2026 06:58:44 +0200 Subject: [PATCH] Fix Google password input (#2861) --- keepassxc-browser/common/sites.js | 2 ++ keepassxc-browser/content/fields.js | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/keepassxc-browser/common/sites.js b/keepassxc-browser/common/sites.js index 2affdc0..c871822 100644 --- a/keepassxc-browser/common/sites.js +++ b/keepassxc-browser/common/sites.js @@ -106,6 +106,8 @@ kpxcSites.exceptionFound = function(identifier, field) { } else if (document.location.origin === 'https://login.dei.gr' && identifier?.value?.includes('show-reveal-password')) { return true; + } else if (document.location.origin === 'https://accounts.google.com' && field?.id === 'password') { + return true; } return false; diff --git a/keepassxc-browser/content/fields.js b/keepassxc-browser/content/fields.js index ff6099f..5c00cd0 100644 --- a/keepassxc-browser/content/fields.js +++ b/keepassxc-browser/content/fields.js @@ -108,6 +108,14 @@ kpxcFields.getExistingCombination = function(combination) { existingCombination.passwordInputs.push(combination.password); } + // Exception for Google. They replace the username input with password input using identical className. + // If detected, remove the username from the combination. + if (existingCombination?.username?.className?.length > 0 + && existingCombination?.password?.className?.length > 0 + && existingCombination?.username?.className === existingCombination?.password?.className) { + existingCombination.username = null; + } + return existingCombination; }