-
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-05-05] [$1000] Invalid urls in chat are parsed as valid, redirecting to the app again. #17591
Comments
Triggered auto assignment to @kadiealexander ( |
Reassigning as I'm heading OOO for a week. |
Triggered auto assignment to @slafortune ( |
Bug0 Triage Checklist (Main S/O)
|
Looks good! |
Job added to Upwork: https://www.upwork.com/jobs/~019d3fae18911c3787 |
Current assignee @slafortune is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
Triggered auto assignment to @jasperhuangg ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Invalid URLs are still parsed by the autolinker as if they are URLs, which results in the weird redirecting behaviour. What is the root cause of that problem?The What changes do you think we should make in order to solve the problem?We need to correct the autolinker's regex so that URLs that start or end with a We need to update the
This results in What alternative solutions did you explore? (Optional)It might be useful for a retrospective fix here too so that previously sent links that got caught up in this don't render incorrectly. This could be done either in the BE, or we can choose to not render empty links on the FE (I think this is a bit out of scope for this bug, though!). |
@jjcoffee The URL Your solution prevents the URL from being highlighted, which isn't what we want. |
@jasperhuangg The If you still think we want to accept it as a valid URL, I think BE would need to be changed. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Invalid urls in chat redirecting to the app again. What is the root cause of that problem?After network debuging, it is a backend issue // in `api?command=AddComment` api we send correct <a> with href attribute.
reportComment: <a href="https://abc-.com" target="_blank" rel="noreferrer noopener">https://abc-.com</a>
// but in `api?command=OpenReport` is received without href attribute
`"html": "<a target="_blank" rel="noreferrer noopener">https://abc-.com</a>"` What changes do you think we should make in order to solve the problem?The fix should be done from backend side. What alternative solutions did you explore? (Optional) |
@mananjadhav, @slafortune, @jasperhuangg Whoops! This issue is 2 days overdue. Let's get this updated quick! |
ah @jjcoffee I see what you mean, thanks I didn't know! If that's the case I'm happy to move forward with your solution. |
@slafortune Are you able to hire me on the Upwork job ready for future payment, when you get a chance? |
I also haven't been hired for the bug report yet and sadly I don't have much connects to apply. Could you please send me an offer instead? My profile link: https://www.upwork.com/freelancers/~014a1b566a7d8ee0c5?s=1110580755107926016 |
@jjcoffee I thought we're covering both the cases. Leading and trailing hyphens. It looks like leading hyphen is still being rendered as a link. |
@mananjadhav This is expected (only the URL part is highlighted, without the hyphen), as stated in my proposal:
|
The other PR with the newer version of expensify-common that also has my fix has now been deployed to production. If no regressions arise, payment should be issued on 2023-05-05. cc @slafortune |
Hi @slafortune could you pls update this issue? |
@jjcoffee @mananjadhav can you fill out the bug zero checklist here (from some other issue where it got posted) And also break down what shoul dbe the rewards here. |
@mountiny @jasperhuangg I unable to pinpoint the offending PR as it looks like it didn't work since a long time and not due to the recent changes. Here's the regression test proposal.
Do we agree 👍 or 👎 ? What do you folks think @jasperhuangg @mountiny @jjcoffee @slafortune ? |
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:
|
50% timeliness bonus is due as this was assigned 24 April, PR (in expensify-common) merged April 25. So I make it $1,500 for contributors (@jjcoffee @mananjadhav) and $250 for the reporting bonus to @chiragxarora. I have applied to the Upwork job @slafortune. |
There are 2 contributors for this issue? |
@chiragxarora I meant @mananjadhav is the C+ |
@mananjadhav - can you check off any pertaining steps in the BZ checklist above? |
@slafortune Thanks Stevie - contract accepted! |
@slafortune Can you please refer this comment for the checklist? Parsing invalid URL seems to be existing since a long time. |
@mananjadhav Yep, I agree with the regression test and that's been created. Is there a PR that introduced the bug has been identified? |
I couldn't trace an offending PR. Plus as I mentioned it looks like we've had the issue since inception. |
@mananjadhav, @slafortune, @jjcoffee, @jasperhuangg Whoops! This issue is 2 days overdue. Let's get this updated quick! |
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 Results:
should not be parsed as url, and if parsed, then should go to that invalid url ending up with an error from search engine on screen
Actual results:
parsed as url, and then on opening that, it redirects to the app again
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.1
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
Screenrecorder-2023-04-16-20-07-14-845.mp4
Recording.265.mp4
Expensify/Expensify Issue URL:
Issue reported by: @chiragxarora
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681656328792209
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: