mirror of
https://github.com/keepassxreboot/keepassxc-browser.git
synced 2026-03-11 08:54:43 +00:00
Fix PayPal TOTP
This commit is contained in:
parent
279b1ec863
commit
4982cfc9cf
4 changed files with 26 additions and 6 deletions
|
|
@ -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'))
|
||||
|
|
|
|||
|
|
@ -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": {
|
||||
|
|
|
|||
4
package-lock.json
generated
4
package-lock.json
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "KeePassXC-Browser",
|
||||
"version": "1.8.1",
|
||||
"version": "1.8.2",
|
||||
"description": "KeePassXC-Browser",
|
||||
"main": "build.js",
|
||||
"devDependencies": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue