-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$4000] App crashes if you send an image immediately after renaming the workspace with < #21133
Comments
Triggered auto assignment to @Christinadobrzyn ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes if you send an image immediately after renaming the workspace with < What is the root cause of that problem?we parse html to get images using open tag App/src/components/AttachmentCarousel/index.js Lines 176 to 177 in 8ba2234
so in this condition when we rename workspace we get html as So we get openTag as App/src/components/AttachmentCarousel/index.js Lines 158 to 161 in 8ba2234
What changes do you think we should make in order to solve the problem?App/src/components/AttachmentCarousel/index.js Lines 158 to 177 in 8ba2234
We are just looking for attachments. We can update this to parse only attachments and this way we can avoid unnecessary parsing. _.forEach(actions, (action) => {
if (!_.get(action, 'isAttachment', false)) return;
htmlParser.write(_.get(action, ['message', 0, 'html']))
}); VideoScreen.Recording.2023-06-20.at.10.56.48.PM.movWhat alternative solutions did you explore? (Optional)None |
I can reproduce - adding External |
Job added to Upwork: https://www.upwork.com/jobs/~012613bc6123fc7e67 |
Current assignee @Christinadobrzyn is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rushatgabhane ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.App crashes if you send an image immediately after renaming the workspace with What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?To solve this problem, I think we should escape html characters. Current code: App/src/libs/ReportActionsUtils.js Lines 148 to 177 in 0bbf3fc
We can add the following code after sorting:
Why this needed?
Screen.Recording.2023-06-30.at.7.54.43.AM.mov
Screen.Recording.2023-06-30.at.7.58.02.AM.movWhat alternative solutions did you explore? (Optional)None |
📣 @jstortoise! 📣
|
|
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Proposal |
Triggered auto assignment to @marcochavezf ( |
@rushatgabhane can you please review the proposals when you have time? Thank you! |
Just a little nudge @rushatgabhane - let me know if you'd like to see more proposals! |
@kushu7 reset on every parse would be expensive. And adding a line break might lead to bugs. |
@jstortoise will the UI show "<" as |
No update here, wrapping up other higher-priority items |
Swamped with other dailies, I will move back this to weekly |
@marcochavezf any updates? Thanks! |
@marcochavezf bump ^^^ |
@marcochavezf bump ^^^ |
@marcochavezf Per this post it looks like we're supposed to close anything that is not part of Waves. To confirm, this doesn't fit any waves and can be closed, correct? |
This is "crash" so I think it should be fixed. If engineers have no time to fix in backend, we can just do frontend fix to avoid crash. |
@marcochavezf do you feel like you'll have time to launch a fix for this on the backend? Or should we default to doing something on the front end? Thanks! |
Oh sorry, I'm still focused on wave7, I think it still requires a backend fix. I can take a look quickly tomorrow |
No worries and thank you @marcochavezf! |
I'm re-evaluating the issue and it looks like the crash is not happening anymore, correct @aimane-chnaif? Also, I was analyzing the possibility of escaping the name in the backend and I noticed we don't have the same mechanism for workspace names as have for comments, so it would not be an easy change and I think it won't be worth do it if the app is not crashing. Said that and since this is not part of a wave, I think we should close it @CortneyOfstad |
Crash now changed to Not found page. The root cause still remains crash.movAs it's not crash, let's close for now. |
Sorry for the delay here — was OoO for the holidays. Sounds good and thanks @aimane-chnaif! |
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:
Go to staging dot on web chrome
Click on Profile and Create a new Workspace
Click on the Workspace name and rename it to
<my workspace
(there should not be gap between < and the workspace name)Notice the workspace name is saved on the #admin room
Go to workspace settings and add any word or letter after the previous name set and click on save to rename the workspace again.
Now on #admins room, send an image and click on it to preview (ex:
)
Notice that the app crashes.
Expected Result:
Preview should work when a workspace is named with <
Actual Result:
App crashes if you send an image immediately after renaming the workspace with <
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?
Version Number: 1.3.29-3
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
Recording.792.mp4
error-2023-06-15_11.21.34.mp4
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686807235965749
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: