mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Merge pull request #1445 from keepassxreboot/fix/add_twitter_to_predefined_sites
Add Twitter to Predefined Sites
This commit is contained in:
commit
75bf977e63
2 changed files with 25 additions and 1 deletions
|
|
@ -55,7 +55,8 @@ const PREDEFINED_SITELIST = [
|
|||
'https://signin.ebay.ph/*',
|
||||
'https://login.yahoo.com/*',
|
||||
'https://id.atlassian.com/*',
|
||||
'https://www.fidelity.com/*'
|
||||
'https://www.fidelity.com/*',
|
||||
'https://twitter.com/i/flow/login'
|
||||
];
|
||||
|
||||
const kpxcSites = {};
|
||||
|
|
@ -97,6 +98,25 @@ kpxcSites.exceptionFound = function(identifier) {
|
|||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Handles a few exceptions for certain sites where 2FA field is not regognized properly.
|
||||
* @param {object} field Input field Element
|
||||
* @returns {boolean} True if an Element has a match with the needed indentfifiers and document location
|
||||
*/
|
||||
kpxcSites.totpExceptionFound = function(field) {
|
||||
if (!field || field.nodeName !== 'INPUT') {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (document.location.href === 'https://twitter.com/i/flow/login'
|
||||
&& field.autocomplete === 'on' && field.dir === 'auto'
|
||||
&& field.name === 'text' && field.type === 'text') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
kpxcSites.expectedTOTPMaxLength = function() {
|
||||
if (document.location.origin.startsWith('https://www.amazon')
|
||||
&& document.location.href.includes('/ap/mfa')) {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,10 @@ kpxcTOTPIcons.isAcceptedTOTPField = function(field) {
|
|||
return true;
|
||||
}
|
||||
|
||||
if (kpxcSites.totpExceptionFound(field)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue