Open Bug 1862995 Opened 1 year ago Updated 2 months ago

Data capture handles incorrectly letters to digits conversion for the phone number entry

Categories

(Toolkit :: Form Autofill, task, P2)

Firefox 121
Desktop
Unspecified
task

Tracking

()

Tracking Status
firefox121 --- disabled

People

(Reporter: asoncutean, Assigned: hballent)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxcm-addr-capture-ux])

Attachments

(1 file)

Attached image screencast issue.gif

Found in

  • 121.0a1

Affected versions

  • 121.0a1

Affected platforms

  • Windows 10
  • macOS 13

Preconditions

  • Install Firefox en-US/en-CA build
  • browser.search.region = US/CA
  • extensions.formautofill.addresses.capture.v2.enabled = true
  • extensions.formautofill.addresses.supported = on

Steps to reproduce

  1. Access https://luke-chang.github.io/autofill-demo/autocomplete-us-separate-fields.html?
  2. Fill the form, but make sure to introduce letters in the Phone field (eg. s or v).

Expected result

  • The address capture doorhanger is not displayed and the phone number can’t be saved.

Actual result

  • The address capture doorhanger is displayed, the letters are mapped into a corresponding digit.

Regression range

  • n/a

Additional notes

  • Not sure what are the implications here, one can ask why a user should enter a letter in the first place inside the form; also the correctness of the provided information is user’s responsibility, but in terms of data integrity at a security level this behavior could maybe be problematic.
Assignee: nobody → dlee
Priority: -- → P2
Whiteboard: [fxcm-addr-capture-ux]
Assignee: dlee → hballent

Upon investigation, this bug seems to be an intentionally added feature that maps chars to digits based on the E.161 Standard for phone numbers. See PhoneNumberNormalizer.sys.mjs. Google Chrome appears to handle the conversion in a similar way.

The aspect of the implementation that I would consider a bug is that it also does the conversion for the country code and area code fields which should not be considered a valid phone number since both sections would never contain a character. The only part of a phone number which would contain chars and still be considered valid would be the local part of the phone number. For example, +1 (562) 444-2222, the 444-2222 is the local part. This could also include an extension as well, to for example reach a specific office in a building.

In accordance with our current logic, if chars were entered into the area code or country code, the number should be recognized as an invalid phone number and not display the save address door hanger. This is also how chrome does it. Currently, we convert the char to digits even if they are in the country or area code and display the door hanger.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: