You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2024-07-22] [HOLD for payment 2024-07-17] [$250] Prevent requesting money from domain emails #44429
if (Str.isDomainEmail(login) && !includeDomainEmail) {
return;
}
In the money request participants page, pass includeDomainEmail as false
Can include the same check in other places in getOptions if needed
What alternative solutions did you explore? (Optional)
includeDomainEmail=false can be used for other use cases that should not include the domain email. We can also default includeDomainEmail to false if we don't want to show this when getting options by default.
We can optionally update the message when not found to "You cannot submit expense to a domain email". It's clearer than "No results found" that's being shown to the user.
@techievivek - To confirm, Do we need to exclude domain email options in all IOU flows: Submit Expense, Split Expense, Pay Someone, Send Invoice? Do we also need to exclude them in the Start chat and assign task flows?
Edit: based on this issue #44485, we need to exclude the domain email option for the Start chat flow. So, I think all flows should be considered.
The PR that introduced the bug has been identified. Link to the PR: No PR caused this, as this introduces a new feature. Previously, there was no logic to exclude domain emails.
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: N/A
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: N/A
Determine if we should create a regression test for this bug. Yes
If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
Regression Test Proposal
From the global create button, select one of the flows: Submit Expense, Split Expense, Pay Someone, Send Invoice, Start chat, or assign task...
In the "Name, email, or phone number" field enter a domain email in this format: +@<domain>, like +@applause.expensifail.com.
Verify that you aren't able to select the domain email as an option.
Activity
melvin-bot commentedon Jun 26, 2024
Job added to Upwork: https://www.upwork.com/jobs/~014e28879d82637e16
[-]Prevent requesting money from domain emails[/-][+][$250] Prevent requesting money from domain emails[/+]melvin-bot commentedon Jun 26, 2024
Triggered auto assignment to @isabelastisser (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.melvin-bot commentedon Jun 26, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah (
External)nkdengineer commentedon Jun 26, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
We'd like to prevent requesting money from domain emails
What is the root cause of that problem?
There's no logic to exclude domain emails when
getOptionsWhat changes do you think we should make in order to solve the problem?
Add a param
includeDomainEmailtogetOptionsApp/src/libs/OptionsListUtils.ts
Line 1769 in 57e5d0e
trueIn
App/src/libs/OptionsListUtils.ts
Line 1941 in 57e5d0e
[Optional] In
App/src/libs/OptionsListUtils.ts
Line 1915 in 57e5d0e
add
In the money request participants page, pass
includeDomainEmailasfalseCan include the same check in other places in
getOptionsif neededWhat alternative solutions did you explore? (Optional)
includeDomainEmail=falsecan be used for other use cases that should not include the domain email. We can also defaultincludeDomainEmailtofalseif we don't want to show this when getting options by default.We can optionally update the message when not found to "You cannot submit expense to a domain email". It's clearer than "No results found" that's being shown to the user.
rayane-d commentedon Jun 26, 2024
@nkdengineer's proposal looks good to me.
🎀👀🎀 C+ reviewed
melvin-bot commentedon Jun 26, 2024
Current assignee @techievivek is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.
rayane-d commentedon Jun 26, 2024
@techievivek - To confirm, Do we need to exclude domain email options in all IOU flows: Submit Expense, Split Expense, Pay Someone, Send Invoice? Do we also need to exclude them in the Start chat and assign task flows?
Edit: based on this issue #44485, we need to exclude the domain email option for the Start chat flow. So, I think all flows should be considered.
34 remaining items
melvin-bot commentedon Jul 18, 2024
Triggered auto assignment to @adelekennedy (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.isabelastisser commentedon Jul 18, 2024
I will be OOO tomorrow and next week, so I am reassigning this until I return on July 29. Thanks, @adelekennedy!
Status:
rayane-d commentedon Jul 20, 2024
Regression Test Proposal
+@<domain>, like+@applause.expensifail.com.Do we agree 👍 or 👎
techievivek commentedon Jul 22, 2024
The regression test looks good to me; @adelekennedy, can we please get that added? Thanks.
techievivek commentedon Jul 22, 2024
Not overdue, completing the BZ list.
melvin-bot commentedon Jul 22, 2024
@isabelastisser, @techievivek, @adelekennedy, @rayane-djouah, @nkdengineer Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
adelekennedy commentedon Jul 22, 2024
https://github.com/Expensify/Expensify/issues/414452
isabelastisser commentedon Jul 29, 2024
Thanks, @adelekennedy !