Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Update needed for Two-Step authentication in El Salvador #49264

Open AtrumGeost opened 3 years ago

AtrumGeost commented 3 years ago

Steps to reproduce the behavior

  1. Go to https://wordpress.com/me/security/two-step
  2. When asked for a phone number select the +503 country code for "El Salvador"
  3. Try entering a phone number that starts with 6XXXXXXX
  4. See error about entering a valid phone number

What I expected to happen

To be able to enter phone numbers that start with 6

What actually happened

The phone number is identified as invalid

Context

Very similar to this issue:

p2UL9c-2Z7-p2

When checking the referenced code on that issue:

https://github.com/Automattic/node-phone/blob/f80b55251b54ab729f94c04f33ae1c7b2b2b0932/lib/index.js#L36

You can see this line:

{alpha2: "SV", alpha3: "SLV", country_code: "503", country_name: "El Salvador", mobile_begin_with: ["7"], phone_number_lengths: [8]},

But according to this Wikipedia Article mobile phone numbers in El Salvador can start with 6 or 7

User report

3668641-zd-woothemes

Browser / OS version

Google Chrome Version 88.0.4324.96 (Official Build) (x86_64) macOS Big Sur 11.1 (20C69)

kavyagokul commented 2 years ago

Also reported in 31746580-hc