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-02-07] [$500] Display Name - User can save Expensify and Concierge as a last name while error is thrown #34304
Version Number: 1.4.24-0 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 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Navigate to Settings > Profile > Display Name
Enter either 'Expensify' or 'Concierge' as the last name
Click on 'Save' button
Expected Result:
User shouldn't be able to save the 'Expensify' or 'Concierge' as last name
Actual Result:
User is able to save the 'Expensify' or 'Concierge' as last name
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
changed the title [-]Display Name - User can save Expensify and Concierge as a last name while error is thrown[/-][+][$500] Display Name - User can save Expensify and Concierge as a last name while error is thrown[/+]on Jan 11, 2024
When we save the legal name (also has first name and last name), if the display names are not set, it will also set the displayName to same as legal name. So the user can save reserved words like Expensify and Concierge as legal name and it will be shown as the display name, and then if the user goes to the display name page and click Save it will show error. We don't currently have any reserved words validation for legal name.
What changes do you think we should make in order to solve the problem?
Validate reserved words for lastName here similar to for first name. We might want to change RESERVED_FIRST_NAMES to RESERVED_NAMES because it doesn't just apply to first name
Add reserved words validation for both first name and last name, to the legal name page. We can optionally fix the back-end to reject legal names that contain reserved words as well
What alternative solutions did you explore? (Optional)
We should additionally evaluate other names like workspace names, room names, personal bank information first & last names, ... to see if we should apply the same reserved words restriction, I think it makes sense to restrict in those places as well to reduce frauds.
Another approach for 2, is to remove the linkage between Legal name and Display name, so if Display name is not already set, when we set Legal name, it should not set Display name to the same values.
I think it's intentional to validate only first name but not last name. And it's what backend already does.
Originally implemented in #14873 to fix #13779
cc: @puneetlath
changed the title [-][$500] Display Name - User can save Expensify and Concierge as a last name while error is thrown[/-][+][HOLD for payment 2024-02-07] [$500] Display Name - User can save Expensify and Concierge as a last name while error is thrown[/+]on Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
[@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
[@fedirjh] 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:
[@fedirjh] 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:
[@fedirjh] Determine if we should create a regression test for this bug.
[@fedirjh] 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.
[@zanyrenney] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
Activity
[-]Display Name - User can save Expensify and Concierge as a last name while error is thrown[/-][+][$500] Display Name - User can save Expensify and Concierge as a last name while error is thrown[/+]melvin-bot commentedon Jan 11, 2024
Job added to Upwork: https://www.upwork.com/jobs/~01afa29712aeb0580b
melvin-bot commentedon Jan 11, 2024
Triggered auto assignment to @zanyrenney (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.melvin-bot commentedon Jan 11, 2024
Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (
External)neonbhai commentedon Jan 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Display Name - User can save Expensify and Concierge as a last name while error is thrown
What is the root cause of that problem?
This happens as we are not checking the lastName for reserved words on this page:
App/src/pages/settings/Profile/DisplayNamePage.js
Lines 56 to 72 in 8a559fd
What changes do you think we should make in order
We should add error checking like we did for first Name
Alternatively
We may add failure data for this request here:
App/src/libs/actions/PersonalDetails.ts
Line 134 in c8631be
abzokhattab commentedon Jan 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Display Name - User can save Expensify and Concierge as a last name while error is thrown
What is the root cause of that problem?
We dont check if the last name is one of the reserved words similar to first name
App/src/pages/settings/Profile/DisplayNamePage.js
Lines 63 to 65 in 9208c95
What changes do you think we should make in order to solve the problem?
we need to add a validation here for the last name as well
dukenv0307 commentedon Jan 11, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
User is able to save the 'Expensify' or 'Concierge' as last name
What is the root cause of that problem?
lastNamedoesn't contain the reserved words similar to what we did with the first namedisplayNameto same as legal name. So the user can save reserved words likeExpensifyandConciergeas legal name and it will be shown as the display name, and then if the user goes to the display name page and clickSaveit will show error. We don't currently have any reserved words validation for legal name.What changes do you think we should make in order to solve the problem?
RESERVED_FIRST_NAMEStoRESERVED_NAMESbecause it doesn't just apply to first nameWhat alternative solutions did you explore? (Optional)
We should additionally evaluate other names like workspace names, room names, personal bank information first & last names, ... to see if we should apply the same reserved words restriction, I think it makes sense to restrict in those places as well to reduce frauds.
Another approach for 2, is to remove the linkage between Legal name and Display name, so if Display name is not already set, when we set Legal name, it should not set Display name to the same values.
mkhutornyi commentedon Jan 11, 2024
I think it's intentional to validate only first name but not last name. And it's what backend already does.
Originally implemented in #14873 to fix #13779
cc: @puneetlath
fedirjh commentedon Jan 11, 2024
@mkhutornyi It seems that the backend also validates the last name and that’s why it throws this error :
33 remaining items
[-][$500] Display Name - User can save Expensify and Concierge as a last name while error is thrown[/-][+][HOLD for payment 2024-02-07] [$500] Display Name - User can save Expensify and Concierge as a last name while error is thrown[/+]melvin-bot commentedon Jan 31, 2024
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jan 31, 2024
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.34-1 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 2024-02-07. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jan 31, 2024
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
zanyrenney commentedon Feb 7, 2024
Payment summary
@fedirjh requires payment automatic offer (Reviewer) - PAID $500
@dukenv0307 requires payment automatic offer (Contributor) PAID $500