Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HOLD for payment 2022-04-06] [$500] Split Money - Able to proceed with split request using first 3 digits of phone number #7688

Closed
kbecciv opened this issue Feb 10, 2022 · 42 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@kbecciv
Copy link

kbecciv commented Feb 10, 2022

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Go to https://staging.new.expensify.com
  2. Log in with any account
  3. Tap on Fub menu and tap Split bill
  4. Add one user
  5. Tap on Search box and start typing the numbers
  6. Delete some numbers and leave it only 3 digits
  7. Click Split bill

Error message:

Unexpected error, please try it again

Expected Result:

Unable to proceed with split request using first 3 digits of phone number

Actual Result:

Able to proceed with split request using first 3 digits

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.38.1

Reproducible in staging?: Yes

Reproducible in production?: Yes

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug5447716_error.mp4
Recording.204.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause

Slack conversation:

View all open jobs on GitHub

@MelvinBot
Copy link

Triggered auto assignment to @deetergp (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@deetergp deetergp removed their assignment Feb 14, 2022
@MelvinBot MelvinBot removed the Overdue label Feb 14, 2022
@deetergp deetergp added the External Added to denote the issue can be worked on by a contributor label Feb 14, 2022
@MelvinBot
Copy link

Triggered auto assignment to @stephanieelliott (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@mdneyazahmad
Copy link
Contributor

Proposal

Invalidate the phone number, if the number of digit is not atleast 4 digit.

&& ((Str.isValidEmail(searchValue) && !Str.isDomainEmail(searchValue)) || Str.isValidPhone(searchValue))

-        && ((Str.isValidEmail(searchValue) && !Str.isDomainEmail(searchValue)) || Str.isValidPhone(searchValue))

+        && ((Str.isValidEmail(searchValue) && !Str.isDomainEmail(searchValue)) || (searchValue.length > 3 && Str.isValidPhone(searchValue)))

@MelvinBot
Copy link

Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane (Exported)

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 16, 2022
@MelvinBot
Copy link

Triggered auto assignment to @iwiznia (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@stephanieelliott
Copy link
Contributor

Posted to Upwork: https://www.upwork.com/jobs/~01531087688241047c

@iwiznia
Copy link
Contributor

iwiznia commented Feb 16, 2022

@mdneyazahmad 👎 on your proposal. Either the SMS regex is wrong and we should update it OR there's really some valid cases of 3 digits phone numbers.

@parasharrajat
Copy link
Member

I think 911 🤖

@stephanieelliott
Copy link
Contributor

Google tells me that the minimum number of digits for a phone number is 4. 911, 311, 411, etc. are actually considered "special dialing codes", they are not actually phone numbers so I am not so sure there is a valid use case for anything less than 4.

I guess this points to the SMS regex being wrong, @iwiznia do we need to update this issue to clarify that?

@iwiznia
Copy link
Contributor

iwiznia commented Feb 18, 2022

Sure why not.

@nbhargava
Copy link
Contributor

Proposal

Update the E164 regex constant in https://github.com/Expensify/expensify-common/blob/main/lib/CONST.jsx so that only minimum 4-digit numbers are accepted by calls to Str.isValidPhone.

        // Regex that matches on a E.164 phone number starting with a '+'
-        E164_REGEX: /^\+?[1-9]\d{1,14}$/,
+        E164_REGEX: /^\+?[1-9]\d{3,14}$/,

@rushatgabhane
Copy link
Member

rushatgabhane commented Feb 21, 2022

Hmm I'm not sure about this one. What's our goal here?

The frontend will allow a split request for +11234, but the server will return error.
So changing the regex to allow 4 digits and above doesn't really add much value.

@iwiznia Do we wanna
A) Only allow proceeding with numbers that are valid. (requires some lib like google/libphonenumber (550kB) or this (150kB))
B) Or, let the server handle validation of phone number like it is now, and do nothing here.

@nbhargava
Copy link
Contributor

Also happy to add in libphonenumber (or something equivalent) if that's what folks feel is the right move here!

@MelvinBot
Copy link

@iwiznia, @rushatgabhane, @jliexpensify Huh... This is 4 days overdue. Who can take care of this?

@iwiznia
Copy link
Contributor

iwiznia commented Mar 7, 2022

Were you not hired in upwork already? I asked @jliexpensify to do it and he reacted with 👍

@MelvinBot MelvinBot removed the Overdue label Mar 7, 2022
@jliexpensify
Copy link
Contributor

Hmm weird: I swear I hired @Santhosh-Sellavel the other day (I've noticed that Upworks sometimes crashes on me and I have to re-do everything...perhaps that's what happened?)

Anyway, you're officially hired now, sorry about that!

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Mar 7, 2022
@MelvinBot
Copy link

📣 @Santhosh-Sellavel You have been assigned to this job by @jliexpensify!
Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@jliexpensify
Copy link
Contributor

Adding @kadiealexander to help keep an eye on my GH's as I'll be OOO next week

@kadiealexander
Copy link
Contributor

@Santhosh-Sellavel, could you please provide an update on this issue?

@Santhosh-Sellavel
Copy link
Collaborator

@kadiealexander #7688 (comment)

PR link-> #8019

@iwiznia
Copy link
Contributor

iwiznia commented Mar 25, 2022

Not overdue, PR was merged yesterday

@MelvinBot MelvinBot removed the Overdue label Mar 25, 2022
@botify botify added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 30, 2022
@botify
Copy link

botify commented Mar 30, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.1.46-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2022-04-06. 🎊

@botify botify changed the title [$500] Split Money - Able to proceed with split request using first 3 digits of phone number [HOLD for payment 2022-04-06] [$500] Split Money - Able to proceed with split request using first 3 digits of phone number Mar 30, 2022
@kadiealexander
Copy link
Contributor

@jliexpensify leaving you assigned, please make payment on this one on the 6th/7th, as I'll be away. Thanks! 🎉

@botify botify removed the Weekly KSv2 label Apr 5, 2022
@MelvinBot MelvinBot added the Daily KSv2 label Apr 5, 2022
@jliexpensify
Copy link
Contributor

Looks like there's a regression for iOS - is this fine to pay? cc @iwiznia @rushatgabhane

@rushatgabhane
Copy link
Member

rushatgabhane commented Apr 7, 2022

@jliexpensify there wasn't any regression here.

I commented in the deploy blocker that the culprit PR is #8087.

And not #8019. I hope this clears it up!

@jliexpensify
Copy link
Contributor

Paid @rushatgabhane and @Santhosh-Sellavel ! Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests