-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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-06-23] [$1000] Invalid html code with large digit crashes android app and throws console error on other platforms #19790
Comments
Triggered auto assignment to @adelekennedy ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Invalid html code with large digit crashes android app and throws console error on other platforms What is the root cause of that problem?Problem came from this line: /**
* Html decode, shorten last message text to fixed length and trim spaces.
* @param {String} lastMessageText
* @returns {String}
*/
function formatReportLastMessageText(lastMessageText) {
return Str.htmlDecode(String(lastMessageText)).replace(CONST.REGEX.AFTER_FIRST_LINE_BREAK, '').substring(0, CONST.REPORT.LAST_MESSAGE_TEXT_MAX_LENGTH).trim();
} htmlDecode(s) {
// Use jQuery if it exists or else use html-entities
if (typeof jQuery !== 'undefined') {
return jQuery('<textarea/>').html(s).text();
}
return AllHtmlEntities.decode(s);
}, We are using What changes do you think we should make in order to solve the problem?Coming from this conversation, we can use the fix from here, which was confirmed by the owner that fixed the problem, by adding the check for invalid html: // if (!isNaN(code) || code >= -32768) {
// if (code <= 65535) {
// chr = String.fromCharCode(code);
// }
// else {
// chr = surrogate_pairs_1.fromCodePoint(code);
// }
// }
chr = code >= 0x10ffff
? entity
: code > 65535
? fromCodePoint(code)
: fromCharCode(numericUnicodeMap[code] || code); We also can consider to upgrade the What alternative solutions did you explore? (Optional)N.A ResultScreen.Recording.2023-05-30.at.13.17.59.mov |
Hi @adelekennedy, I am still able to reproduce on latest staging, let me know if you need any assistance or have any doubt, I will be available. 2023-05-31.09-05-39.mp4 |
@dhanashree-sawant I'm not able to reproduce - but since you've been able to repeatedly I think it's safe to call this a bug |
Job added to Upwork: https://www.upwork.com/jobs/~0137581aed483fd0c3 |
Current assignee @adelekennedy is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
Triggered auto assignment to @iwiznia ( |
Agree! Let's fix this issue upstream |
More information about breaking change in case we wanna fix this upstream: |
ProposalPlease re-state the problem that we are trying to solve in this issue.Invalid html code with large digit crashes android app and throws console error on other platforms What is the root cause of that problem?We are using What changes do you think we should make in order to solve the problem?Update What alternative solutions did you explore? (Optional)N.A |
📣 @benjaminbennet! 📣
|
|
1 similar comment
|
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
Not overdue, waiting for proposal reviews. |
Yeah |
cool!, PR is ready @iwiznia |
Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:
On to the next one 🚀 |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.28-5 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-06-23. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
payment issued! |
@adelekennedy Thank you. Also I think this issue is eligible for speed bonus right? |
|
Not overdue, this is awaiting for payment |
@hungvu193 not according to this comment is it wrong? |
Yeah, that's wrong, because I created the PR in expensify-common, and it was merged within 2 days. |
@hungvu193 ty - I'll add the speed bonus! |
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:
�
Expected Result:
App shouldn't crash or provide console error on sending invalid html codes with large digit
Actual Result:
App crashes in android and provides console error on other devices when we send invalid html codes with large digit
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.20-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
Notes/Photos/Videos: Any additional supporting documentation
android.app.crash.invalid.html.code.long.digit.mp4
az_recorder_20230529_220029.1.mp4
Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685098437111809
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: