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:
authorSami Vänttinen <sami.vanttinen@protonmail.com>2022-08-24 22:25:14 +0300
committerSami Vänttinen <sami.vanttinen@protonmail.com>2022-08-24 22:25:14 +0300
commit4982cfc9cfc0aa8e405e15a68f53af3939223ba7 (patch)
tree7e9ea4ea6d453db9cbea77f7075c1cceb7f8a938
parent279b1ec863805bb040a61fc7ad0346463fa07cae (diff)
Fix PayPal TOTPfix/paypal_totp
-rw-r--r--keepassxc-browser/content/fields.js22
-rwxr-xr-xkeepassxc-browser/manifest.json4
-rw-r--r--package-lock.json4
-rw-r--r--package.json2
4 files changed, 26 insertions, 6 deletions
diff --git a/keepassxc-browser/content/fields.js b/keepassxc-browser/content/fields.js
index a2db5a5..2170c2e 100644
--- a/keepassxc-browser/content/fields.js
+++ b/keepassxc-browser/content/fields.js
@@ -115,11 +115,31 @@ kpxcFields.getSegmentedTOTPFields = function(inputs, combinations) {
}
};
+ const formLengthMatches = function(currentForm) {
+ if (!currentForm) {
+ return false;
+ }
+
+ // Accept 6 inputs directly
+ if (currentForm.length === 6) {
+ return true;
+ }
+
+ // 7 inputs with a button as the last one (e.g. PayPal uses this)
+ if (currentForm.length === 7
+ && (currentForm.lastChild.nodeName === 'BUTTON'
+ || (currentForm.lastChild.nodeName === 'INPUT' && currentForm.lastChild.type === 'button'))) {
+ return true;
+ }
+
+ return false;
+ };
+
const form = inputs.length > 0 ? inputs[0].form : undefined;
if (form && (acceptedOTPFields.some(f => (form.className && form.className.includes(f))
|| (form.id && typeof(form.id) === 'string' && form.id.includes(f))
|| (form.name && typeof(form.name) === 'string' && form.name.includes(f))
- || form.length === 6))) {
+ || formLengthMatches(form)))) {
// Use the form's elements
addTotpFieldsToCombination(form.elements);
} else if (inputs.length === 6 && inputs.every(i => (i.inputMode === 'numeric' && i.pattern.includes('0-9'))
diff --git a/keepassxc-browser/manifest.json b/keepassxc-browser/manifest.json
index b5c18e6..341ba81 100755
--- a/keepassxc-browser/manifest.json
+++ b/keepassxc-browser/manifest.json
@@ -1,8 +1,8 @@
{
"manifest_version": 2,
"name": "KeePassXC-Browser",
- "version": "1.8.1",
- "version_name": "1.8.1",
+ "version": "1.8.2",
+ "version_name": "1.8.2",
"description": "__MSG_extensionDescription__",
"author": "KeePassXC Team",
"icons": {
diff --git a/package-lock.json b/package-lock.json
index 84ea8d8..1095d47 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "KeePassXC-Browser",
- "version": "1.8.1",
+ "version": "1.8.2",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "KeePassXC-Browser",
- "version": "1.8.1",
+ "version": "1.8.2",
"license": "GPL-3.0",
"dependencies": {
"@npmcli/fs": "^2.1.0",
diff --git a/package.json b/package.json
index ec1fa7c..c2d2492 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "KeePassXC-Browser",
- "version": "1.8.1",
+ "version": "1.8.2",
"description": "KeePassXC-Browser",
"main": "build.js",
"devDependencies": {