-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat: Detect URLs in monitor descriptions #5576
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would open us to an XSS, as the content is just v-html
'ed..
@CommanderStorm That's the reason I've sanitized the input from the description and not processed it blindly. |
I think there might be a misunderstanding. My concern isn’t about creating links but about the rest of the input. The current approach doesn’t sanitize the description to prevent an XSS. For example, if a |
Here is how we do this on the status page side. uptime-kuma/src/pages/StatusPage.vue Lines 589 to 595 in 20820f5
|
I managed to avoid Not sure what failed the test though. It says Edit: I've synced my branch and it triggered a rerun ✅ |
Have you investigated if a similar solution as on the status page could work? (What you came up with looks quite hacky..) |
Sure, I'll give it a shot. |
@CommanderStorm I've used the approach you suggested from
It's still better than nothing and I have no problem with this solution, but I do think the component approach is slightly better functionality-wise. What do you think? If it looks good to you feel free to merge :) |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Fixes #5575
Adds a minimal logic to the description field to detect URL schemes and make them clickable.
It also sanitizes the URL to prevent XSS attacks.
Type of change
Checklist
Screenshots (if any)