-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2023-12-28] [$500] Mentioning an email with double @ sign results in an invalid email mention #28946
Comments
Job added to Upwork: https://www.upwork.com/jobs/~016783de9809fcb5bd |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Mentions with Double leading What is the root cause of that problem?To correctly calculate the display name or the login of the mentioned user, we only remove the leading App/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.js Lines 45 to 50 in 8d42ad3
This only remove the first What changes do you think we should make in order to solve the problem?We can use the following regex to remove all the leading @ and correctly calculate the navigation link displayNameOrLogin = props.tnode.data.replace(/^((CONST\.UNICODE\.LTR)*@)*/, '') Test 1: Removing multiple leading const str = '@@@hello world';
const result = str.replace(/^((CONST\.UNICODE\.LTR)*@)*/, '');
console.log(result); // Output: 'hello world' Test 2: Removing one leading const str = '@hello world';
const result = str.replace(/^((CONST\.UNICODE\.LTR)*@)*/, '');
console.log(result); // Output: 'hello world' What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Mentioning an email with double @ sign results in an invalid email mention. What is the root cause of that problem?The root cause is replace regex of Currently, it inputs the whole string inside
That's why the app shows invalid email with What changes do you think we should make in order to solve the problem?We need to update replace regex of
As a result, the app will show valid email although the user inputs multiple
What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Mentioning an email with double @ sign results in an invalid email mention What is the root cause of that problem?We're matching multiple regex: new RegExp(`[a-zA-Z0-9.!$%&+/=?^\`{|}-]?@+${CONST.REG_EXP.EMAIL_PART}(?!((?:(?!<a).)+)?<\\/a>|[^<]*(<\\/pre>|<\\/code>))`, 'gm'), What changes do you think we should make in order to solve the problem?I propose removing the regex: new RegExp(`[a-zA-Z0-9.!$%&+/=?^\`{|}-]?@${CONST.REG_EXP.EMAIL_PART}(?!((?:(?!<a).)+)?<\\/a>|[^<]*(<\\/pre>|<\\/code>))`, 'gm'), This is what the regex will capture whenever there are multiple leading This behavior is also consistent with what we currently have when there are multiple leading Demo after changesexpensify-fix-double-at-symbol-bug-demo.movWhat alternative solutions did you explore? (Optional)None as of yet. |
@Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
Thanks, @akamefi202 @Victor-Nyagudi Both of your proposals work. I like your @Victor-Nyagudi as its cleaner and does the job. Wondering why + was added in the first place, are we missing something? |
I'm not sure either, @Santhosh-Sellavel. I looked through the merged PRs dealing with mentions, and I didn't find any that added the EDIT: Specified what the PRs I looked at dealt with. |
Triggered auto assignment to @abekkala ( |
Bug0 Triage Checklist (Main S/O)
|
@Santhosh-Sellavel do you have any further input for the proposals that were provided? |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@abekkala, @Santhosh-Sellavel Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@getusha can you respond to @Santhosh-Sellavel question
|
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.14-6 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 2023-12-28. 🎊 After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on 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:
|
@amyevans, @abekkala, @kadiealexander, @Victor-Nyagudi, @Santhosh-Sellavel Eep! 4 days overdue now. Issues have feelings too... |
@amyevans, @abekkala, @kadiealexander, @Victor-Nyagudi, @Santhosh-Sellavel Huh... This is 4 days overdue. Who can take care of this? |
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:
|
Bug: Mentioning an email with double @ sign results in an invalid email mention Steps:
|
I'm back from ooo, unassigning @kadiealexander and creating regression test GH and payment today |
@Victor-Nyagudi payment sent and contract ended - thank you! 🎉 |
@adeel0202 payment offer sent in Upwork - once accepted, I can process payment |
@Santhosh-Sellavel - [$500] to be made via New Dot |
Thanks. I've accepted. |
@adeel0202 payment sent and contract ended - thank you! 🎉 |
@Santhosh-Sellavel have you requested/received your payment in NewDot? |
Requested on ND |
PAYMENTS:Muhammad Adeel Nawaz paid ✅ Santosh - requested payment [$500] in ND |
$500 payment approved for @Santhosh-Sellavel based on this comment. |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Action Performed:
Expected Result:
The valid email is mentioned
Actual Result:
Invalid email is mentioned
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.78-2
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
web.mov
desktop.mov
RPReplay_Final1696444877.MP4
RPReplay_Final1696444780.MP4
Screen_Recording_20231004_232047_New.Expensify.MP4
Screen_Recording_20231004_232235_Chrome.MP4
Recording.481.mp4
Expensify/Expensify Issue URL:
Issue reported by: @adeel0202
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1696445508377469
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: