Closed Bug 1764709 Opened 2 years ago Closed 2 years ago

Expiration month and year are not normalized when credit card form is using separate fields for expiration date

Categories

(Toolkit :: Form Autofill, defect, P2)

defect

Tracking

()

RESOLVED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox99 --- unaffected
firefox100 --- unaffected
firefox101 --- wontfix
firefox102 --- fixed

People

(Reporter: dimi, Assigned: tgiles)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

See here. The result is not normalized when there is no "cc-exp" in the credit card record.

Currently this issue doesn't affect desktop because we still normalize credit card record in the parent side. However, this issue causes us send inconsistent data to geckoview (normalized credit card record when a form is using a single "cc-exp" field, non-normalized cc record when a form is using "cc-exp-month" + "cc-exp-year".

Set release status flags based on info from the regressing bug 1760834

:tgiles, since you are the author of the regressor, bug 1760834, could you take a look?
For more information, please visit auto_nag documentation.

Flags: needinfo?(tgiles)

:agi If we fix this issue, the information in CC recrod will always look like:

  • Card Number: xxxxyyyyzzzzaaaa (hyphen and white space are removed from the number)
  • Expiration Month: String 1-12 (without 0, ex 02 will become 2)
  • Expiration Year: 20XX (Ex. expiration year can be 22 if the expiration year is this year)

I know AutocompleteTest.kt has to be updated because right now a lot of testcases are using non-normalized data while comparing expected result. I would also like to know whether the implementation also needs to be updated, what format geckoview expects currently.

Flags: needinfo?(agi)
Has Regression Range: --- → yes

I can work on fixing this. I'll just need some pointers for the AutocompleteTest.kt situation that Dimi pointed out in Comment #4.

Assignee: nobody → tgiles
Severity: -- → S3
Status: NEW → ASSIGNED
Flags: needinfo?(tgiles)
Priority: -- → P2

(In reply to Dimi Lee [:dimi][:dlee] from comment #4)

:agi If we fix this issue, the information in CC recrod will always look like:

  • Card Number: xxxxyyyyzzzzaaaa (hyphen and white space are removed from the number)
  • Expiration Month: String 1-12 (without 0, ex 02 will become 2)
  • Expiration Year: 20XX (Ex. currently expiration year can be 22 if the expiration year is this year)

I know AutocompleteTest.kt has to be updated because right now a lot of testcases are using non-normalized data while comparing expected result. I would also like to know whether the implementation also needs to be updated, what format geckoview expects currently.

GeckoView-wise I don't see any problems with normalizing the data like you describe. I wouldn't expect the front-end to have problems with this either, but I'm not sure. GL what do you think?

Flags: needinfo?(agi) → needinfo?(gl)

The normalized data looks good for mobile.

Flags: needinfo?(gl)
Attachment #9272911 - Attachment description: WIP: Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. → Bug 1764709 - Always normalize credit card expiration month and year when creating a new record.
Attachment #9272911 - Attachment description: Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. → Bug 1764709 - Always normalize credit card expiration month and year when creating a new record. r=agi,dimi!,sgalich!
Pushed by tgiles@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/360f31b00167
Always normalize credit card expiration month and year when creating a new record. r=geckoview-reviewers,dimi,sgalich,agi

Backed out changeset 360f31b00167 (bug 1764709) for causing bc failures in browser_creditCard_submission_normalized.

Backout link: https://hg.mozilla.org/integration/autoland/rev/a6d65eaa09e8d3a5bdcd6fef4b4c30060c45852d

Push with failures

Failure log

Flags: needinfo?(tgiles)
Pushed by tgiles@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e71ddfbf9c29
Always normalize credit card expiration month and year when creating a new record. r=geckoview-reviewers,dimi,sgalich,agi
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
Flags: needinfo?(tgiles)

We disable browser_creditCard_submission_normalized.js in apple_silicon for now, this is the same issue as Bug 1714221 Comment 54.

The patch landed in nightly and beta is affected.
:tgiles, is this bug important enough to require an uplift?
If not please set status_beta to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(tgiles)

:gl since this patch affects only mobile credit card autofill, do you think we should uplift this? Without the patch, there's a chance Gecko will send non-normalized data for sites that use separate expiry month and year fields. For example, if the expiry year was "2024", we will send over "24" and if expiry month was "05", we will send "05" instead of 5.

Flags: needinfo?(tgiles) → needinfo?(gl)

(In reply to Tim Giles [:tgiles] from comment #15)

:gl since this patch affects only mobile credit card autofill, do you think we should uplift this? Without the patch, there's a chance Gecko will send non-normalized data for sites that use separate expiry month and year fields. For example, if the expiry year was "2024", we will send over "24" and if expiry month was "05", we will send "05" instead of 5.

Hi, that won't be necessary since we haven't implemented save/update prompts for credit cards. We were previously depending on ensuring we were passing the credit card information correctly into GV in order to implement these prompts.

Flags: needinfo?(gl)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: