mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Fix PayPal password input detection
This commit is contained in:
parent
5fef10d5ee
commit
a0e2395c84
3 changed files with 30 additions and 8 deletions
|
|
@ -110,7 +110,31 @@ kpxcSites.exceptionFound = function(identifier, field) {
|
|||
return true;
|
||||
} else if (document.location.origin === 'https://www.epicgames.com'
|
||||
&& ((field?.style?.opacity === '1' && field?.style?.willChange === 'auto') || identifier === 'password')) {
|
||||
return true;
|
||||
return true;
|
||||
} else if (document.location.origin === 'https://www.paypal.com' && field?.id === 'splitPassword') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
// Handles exceptions when returning or modifying existing combinations
|
||||
kpxcSites.combinationExceptionFound = function(existingCombination) {
|
||||
if (!existingCombination) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Exception for e.g. 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) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (document.location.origin === 'https://www.paypal.com'
|
||||
&& existingCombination.password?.className?.includes('pin-password')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -108,11 +108,8 @@ 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) {
|
||||
// Remove username field from combination with certain sites (replaced by password input)
|
||||
if (kpxcSites.combinationExceptionFound(existingCombination)) {
|
||||
existingCombination.username = null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -247,8 +247,9 @@ kpxcObserverHelper.findInputsFromShadowDOM = function(target) {
|
|||
|
||||
// Detects animations and transitions. Triggers handleObserverAdd() again on animationend/transitionend.
|
||||
kpxcObserverHelper.handleTransitions = function(target) {
|
||||
const targetHasAnimations = target?.classList?.toString()?.includes('animate');
|
||||
const targetHasDurations = target?.classList?.toString()?.includes('duration');
|
||||
const classList = target?.classList?.toString();
|
||||
const targetHasAnimations = classList?.includes('animate');
|
||||
const targetHasDurations = classList?.includes('duration') || classList?.includes('transform');
|
||||
|
||||
if (targetHasAnimations || targetHasDurations) {
|
||||
const animations = target.getAnimations();
|
||||
|
|
|
|||
Loading…
Reference in a new issue