Closed
Bug 1485105
Opened 7 years ago
Closed 7 years ago
Update credit card number validation
Categories
(Toolkit :: Form Autofill, enhancement, P1)
Toolkit
Form Autofill
Tracking
()
VERIFIED
FIXED
mozilla64
Tracking | Status | |
---|---|---|
firefox64 | --- | verified |
People
(Reporter: sfoster, Assigned: sfoster)
References
Details
(Whiteboard: [webpayments])
Attachments
(1 file)
The valid range of credit card number (PAN) digit lengths varies from card network to network. For simplicity's sake, we should accept anything from 12-19 While most numbers are still 16 digits, Mastercard and others are now issuing 19 digit PANs, Maestro numbers can be anywhere from 12 to 19 digits long.
Updated•7 years ago
|
Priority: -- → P3
Whiteboard: [webpayments-reserve] [triage]
Updated•7 years ago
|
Priority: P3 → --
Whiteboard: [webpayments-reserve] [triage] → [webpayments] [triage]
Updated•7 years ago
|
Flags: qe-verify+
Priority: -- → P3
QA Contact: hani.yacoub
Whiteboard: [webpayments] [triage] → [webpayments-reserve]
Updated•7 years ago
|
Priority: P3 → P2
Whiteboard: [webpayments-reserve] → [webpayments]
Assignee | ||
Comment 2•7 years ago
|
||
I pushed a change to try to flush out any non-obvious (test) ramifications to the proposed change: https://treeherder.mozilla.org/#/jobs?repo=try&revision=df47bd264f8c5e4fa4285d621a593672f5334a23
tldr; unless I missed an important test suite, the xpcshell tests for CreditCard.jsm seem to be the only place we have test coverage for what digit lengths are considered valid.
Assignee | ||
Comment 3•7 years ago
|
||
Updated•7 years ago
|
Assignee: nobody → sfoster
Status: NEW → ASSIGNED
Priority: P2 → P1
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Sam Foster [:sfoster] from comment #2)
> I pushed a change to try to flush out any non-obvious (test) ramifications
> to the proposed change:
> https://treeherder.mozilla.org/#/
> jobs?repo=try&revision=df47bd264f8c5e4fa4285d621a593672f5334a23
>
> tldr; unless I missed an important test suite, the xpcshell tests for
> CreditCard.jsm seem to be the only place we have test coverage for what
> digit lengths are considered valid.
New patch, new push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=daa80405bd827c8bde86a7cc1ebb39295ca102b7&selectedJob=204605883
Pushed by sfoster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e702628b7c51
Allow 12-19 digit length card numbers. r=MattN
Comment 6•7 years ago
|
||
Backed out changeset e702628b7c51 (bug 1485105) for test_form_submission.html failures
push that caused the backout: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&selectedJob=204637938&revision=e702628b7c514789f8372ac593da4ea9b445b7e2
failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&resultStatus=testfailed,busted,exception&classifiedState=unclassified&revision=e702628b7c514789f8372ac593da4ea9b445b7e2&failure_classification_id=2
backout: https://hg.mozilla.org/integration/autoland/rev/9605a2bb0c596ed1badeead50ebd3f47d8378d6f
Flags: needinfo?(sfoster)
Pushed by sfoster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/31313cac4517
Allow 12-19 digit length card numbers. r=MattN
Comment 8•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee | ||
Comment 9•7 years ago
|
||
Clearing need-info. Thanks for the backout :andrei_ciure_, this has since been fixed and re-landed.
Flags: needinfo?(sfoster)
Comment 10•7 years ago
|
||
Backed out for causing Bug 1498071.
Recent failure log of Bug 1498071 : https://treeherder.mozilla.org/logviewer.html#?job_id=205348891&repo=mozilla-inbound&lineNumber=2718
Status: RESOLVED → REOPENED
status-firefox64:
fixed → ---
Flags: needinfo?(sfoster)
Resolution: FIXED → ---
Target Milestone: mozilla64 → ---
Comment 11•7 years ago
|
||
Backout by nbeleuzu@mozilla.com:
https://hg.mozilla.org/mozilla-central/rev/b6abd17c078b
Backed out changeset 31313cac4517 for causing Bug1498071. a=backout
Updated•7 years ago
|
Status: REOPENED → ASSIGNED
Assignee | ||
Comment 12•7 years ago
|
||
Sigh. Another case of Date.now() being intepretted as a potentially-valid credit card number in an input field. Thanks for spotting and backing out. I have an updated patch with this and another similar issue fixed.
Try push:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d7704a8a1afa472b4d144be39a28f933f8cef9bd
Flags: needinfo?(sfoster)
Assignee | ||
Comment 13•7 years ago
|
||
I've gone through searchfox results for Date.now() looking for cases where it is used as input into a text field - and where that value is expected to be saved for later autofill or session restore. In these cases Date.now() is just being used as a way of getting arbitrary and random-ish characters, so .toString(16) works to accomplish the same goal and not produce a value that looks like a credit card number.
That try push looks good in the sense that I didn't break any tests. Its hard to know I've got all the new intermittents without a lot more data though.
Comment 14•7 years ago
|
||
Pushed by sfoster@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/583d689d630e
Allow 12-19 digit length card numbers. r=MattN
Comment 15•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago → 7 years ago
status-firefox64:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Comment 16•7 years ago
|
||
Verified - Fixed on latest Nightly 65.0a1 (2018-10-24) on Windows 7/10, Ubuntu 16.04. and Mac OS 10.13.
Number validation accepts credit card numbers with the length of 12-19 digits.
You need to log in
before you can comment on or make changes to this bug.
Description
•