Open Bug 1650863 Opened 4 years ago Updated 4 years ago

Credit Card Autofill should disqualify fields that are nonsensically short

Categories

(Toolkit :: Form Autofill, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: abr, Unassigned)

Details

(Whiteboard: [cc-autofill-reserve])

Given its heuristic nature, it is possible that our algorithm for identification of credit card fields mis-identifies certain <input> elements. One additional hint that this has happened is examination of a maxLength attribute on any such elements, and ensuring that it is not shorter than makes semantic sense for the field in question (e.g., 14 for cc-number, 2 for cc-exp-month or cc-exp-year, or 5 for cc-exp). If the length is shorter than sensible, we should remove the field from the set of fields to be autofilled.

Whiteboard: [ccautofill]

In CreditCard#isValidNumber we use the range 12-19 characters for cc-number in https://searchfox.org/mozilla-central/source/toolkit/modules/CreditCard.jsm#198 it makes to use the same range for min/maxLength on the field.

Priority: -- → P3
Whiteboard: [ccautofill] → [cc-autofill-reserve]
You need to log in before you can comment on or make changes to this bug.