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 #17387] [$1000] Group chat created even if there is an invalid email id and Error occurs after sending first message #18181

Closed
1 of 6 tasks
kavimuru opened this issue Apr 28, 2023 · 49 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2

Comments

@kavimuru
Copy link

kavimuru commented Apr 28, 2023

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. Create a new group chat
  2. Add an invalid email id (an email id with more than 64 characters for the email - not including the domain) eg ganache-tasacks.0z+randomlongtexttoreachsomecharactersneedsommore@icloud.com
  3. Add few more valid emails (eg ganache-tacks.0z+randomlongtexttoreachsomecharactersneedsommore@icloud.com, ganache-tacks.0z+randomlongtexttor3eachsomecharactersneedsomemo_@icloud.com and ganache-tacks.0z+randomlongtexttoreachsomecharactersneedsomemo_@icloud.com)
  4. Create group

Expected result:

It should throw an error while creating group.

Actual result:

Group chat is created and error occurs after sending the first message.

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.8
Reproducible in staging?: y
Reproducible in production?: y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Screen.Recording.2023-04-28.at.1.06.48.AM.mov
Recording.417.mp4

Expensify/Expensify Issue URL:
Issue reported by: @shivansh9007
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1682670612672119

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01e9bb14ea353bc37e
  • Upwork Job ID: 1653836331831513088
  • Last Price Increase: 2023-05-10
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 28, 2023
@MelvinBot
Copy link

Triggered auto assignment to @adelekennedy (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot
Copy link

MelvinBot commented Apr 28, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@jayeshmangwani
Copy link
Contributor

@kavimuru I have reported a similar bug before https://expensify.slack.com/archives/C049HHMV9SM/p168231323463581911, can you please check this

@melvin-bot melvin-bot bot added the Overdue label May 1, 2023
@kavimuru
Copy link
Author

kavimuru commented May 1, 2023

@jayeshmangwani I was not able to reproduce your bug. Also it was not mentioned in the bug report that invalid email for one of the user.

@MelvinBot
Copy link

@adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

1 similar comment
@MelvinBot
Copy link

@adelekennedy Whoops! This issue is 2 days overdue. Let's get this updated quick!

@adelekennedy
Copy link

Agree it should throw an error while creating the group - let's make it external

@melvin-bot melvin-bot bot removed the Overdue label May 3, 2023
@adelekennedy adelekennedy added External Added to denote the issue can be worked on by a contributor Overdue labels May 3, 2023
@melvin-bot melvin-bot bot changed the title Group chat created even if there is an invalid email id and Error occurs after sending first message [$1000] Group chat created even if there is an invalid email id and Error occurs after sending first message May 3, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~01e9bb14ea353bc37e

@MelvinBot
Copy link

Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 3, 2023
@MelvinBot
Copy link

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

@adelekennedy
Copy link

Looks workable to me!

@melvin-bot melvin-bot bot removed the Overdue label May 3, 2023
@alexrasla
Copy link

Proposal

Please re-state the problem that we are trying to solve in this issue.

In this problem, we are able to add email ids that have more than 64 characters when creating a New Group.

What is the root cause of that problem?

The root cause of the problem is the fact that the isValidEmailfunction in node_modules/expensify-common/lib/str.js does not check for email ids that are > 64 characters. The function only checks that the string parameter has valid email characters and an @ sign through regular expressions.

What changes do you think we should make in order to solve the problem?

The change I would make to solve this is simply checking if the email is less than or equal to 64 characters in the isValidEmail function. This would produce the Invalid email error as shown below so the user would never be able to add the email address to the group.

Screenshot 2023-05-03 at 8 24 14 PM

Screenshot 2023-05-03 at 8 00 03 PM

What alternative solutions did you explore? (Optional)

An alternative solution I explored is checking that all the emails are less than 64 characters within the navigateToAndOpenReport function. However, I believe this solution is worse because email addresses can never be more than 64 characters, as per the accepted email address standards

Screenshot 2023-05-03 at 8 25 33 PM

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@MelvinBot

This comment was marked as outdated.

@alexrasla
Copy link

Contributor details
Your Expensify account email: alex.rasla@me.com
Upwork Profile Link: https://www.upwork.com/freelancers/~0197c9436d4d7508f2

@MelvinBot
Copy link

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@mollfpr
Copy link
Contributor

mollfpr commented May 4, 2023

Thanks @alexrasla, for the proposal. To catch that email limit character, I'd prefer to fix the regex CONST.REG_EXP.EMAIL. The standard limited the username to 64 characters and the domain name to 255 characters. So not just limit the string before the domain, but also limit the character after the domain name.

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented May 4, 2023

We're going to fix all email validation inconsistency issues (frontend vs backend, chat vs search vs login vs contact, etc) in one GH - #17387 (comment)

@melvin-bot
Copy link

melvin-bot bot commented Jun 5, 2023

@Beamanator, @mollfpr, @adelekennedy Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@adelekennedy
Copy link

Still holding

@melvin-bot melvin-bot bot removed the Overdue label Jun 6, 2023
@adelekennedy adelekennedy added Weekly KSv2 and removed Daily KSv2 labels Jun 7, 2023
@melvin-bot melvin-bot bot added the Overdue label Jun 15, 2023
@adelekennedy adelekennedy added Monthly KSv2 and removed Weekly KSv2 labels Jun 16, 2023
@melvin-bot melvin-bot bot removed the Overdue label Jun 16, 2023
@adelekennedy
Copy link

Still on hold!

@melvin-bot melvin-bot bot added the Overdue label Jul 17, 2023
@adelekennedy
Copy link

hold

@Beamanator
Copy link
Contributor

still on hold but seems like issue we're holding on has some progress

@melvin-bot melvin-bot bot removed the Overdue label Aug 21, 2023
@melvin-bot melvin-bot bot added the Overdue label Sep 21, 2023
@adelekennedy
Copy link

still holdin on!

@melvin-bot melvin-bot bot removed the Overdue label Sep 21, 2023
@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@Beamanator
Copy link
Contributor

held issue is closed! can we close this one out too??

@melvin-bot melvin-bot bot removed the Overdue label Oct 23, 2023
@melvin-bot melvin-bot bot added the Overdue label Nov 23, 2023
@Beamanator
Copy link
Contributor

I think we can close this out 👍

@melvin-bot melvin-bot bot removed the Overdue label Nov 24, 2023
Copy link

melvin-bot bot commented Nov 24, 2023

📣 @shivansh-nathani! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Monthly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants