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:
Diffstat (limited to 'keepassxc-browser/common/sites.js')
-rw-r--r--keepassxc-browser/common/sites.js22
1 files changed, 21 insertions, 1 deletions
diff --git a/keepassxc-browser/common/sites.js b/keepassxc-browser/common/sites.js
index 241c2fd..0037501 100644
--- a/keepassxc-browser/common/sites.js
+++ b/keepassxc-browser/common/sites.js
@@ -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')) {