Skip to content

Commit

Permalink
Super small fix (#412)
Browse files Browse the repository at this point in the history
* Fix for cc expiry date

Signed-off-by: Emanuele Feliziani <[email protected]>

* Log tweaks

Signed-off-by: Emanuele Feliziani <[email protected]>

* Add tests and compiled files

Signed-off-by: Emanuele Feliziani <[email protected]>

---------

Signed-off-by: Emanuele Feliziani <[email protected]>
  • Loading branch information
GioSensation authored Nov 9, 2023
1 parent 611e149 commit 8ae227f
Show file tree
Hide file tree
Showing 10 changed files with 345 additions and 28 deletions.
10 changes: 5 additions & 5 deletions dist/autofill-debug.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions dist/autofill.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/Form/Form.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class Form {
foundInputs.forEach(input => this.addInput(input))
} else {
// This is rather extreme, but better safe than sorry
this.device.scanner.stopScanner('The form has too many inputs, bailing.')
this.device.scanner.stopScanner(`The form has too many inputs (${foundInputs.length}), bailing.`)
return
}
}
Expand Down Expand Up @@ -449,7 +449,7 @@ class Form {

// If the form has too many inputs, destroy everything to avoid performance issues
if (this.inputs.all.size > MAX_INPUTS_PER_FORM) {
this.device.scanner.stopScanner('The form has too many inputs, destroying.')
this.device.scanner.stopScanner('The form has too many inputs, bailing.')
return this
}

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/Form/matching-config/selectors-css.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const username = [

const password = [
`input[type=password]:not([autocomplete*=cc]):not([autocomplete=one-time-code]):not([name*=answer i]):not([name*=mfa i]):not([name*=tin i]):not([name*=card i]):not([name*=cvv i])`,
// DDG's CloudSave feature https://emanuele.duckduckgo.com/settings
// DDG's CloudSave feature https://duckduckgo.com/settings
'input.js-cloudsave-phrase'
]

Expand Down Expand Up @@ -154,7 +154,8 @@ const expirationMonth = `
[id*=expiration i][id*=month i],
[name*=cc-exp-month i],
[name*="card_exp-month" i],
[name*=cc_exp_month i]`
[name*=cc_exp_month i],
[id*=cc-month i]`

const expirationYear = `
[autocomplete="cc-exp-year" i],
Expand All @@ -167,7 +168,8 @@ const expirationYear = `
[id*=expiration i][id*=year i],
[name*="cc-exp-year" i],
[name*="card_exp-year" i],
[name*=cc_exp_year i]`
[name*=cc_exp_year i],
[id*=cc-year i]`

const expiration = `
[autocomplete="cc-exp" i],
Expand Down
1 change: 1 addition & 0 deletions src/Form/test-cases/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -504,5 +504,6 @@
{ "html": "metalarchives_login.html" },
{ "html": "accor_hotel-booking.html" },
{ "html": "pcsretirementcom_login.html", "expectedSubmitFalsePositives": 3 },
{ "html": "lakeshorelearning_checkout.html" },
{ "html": "flytap_login.html" }
]
Loading

0 comments on commit 8ae227f

Please sign in to comment.