Skip to content
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

External cal events containing HTML are not parsed #76

Closed
NovaFox161 opened this issue Oct 20, 2020 · 1 comment
Closed

External cal events containing HTML are not parsed #76

NovaFox161 opened this issue Oct 20, 2020 · 1 comment
Labels
area/bot Issues and pull requests relating to the Bot module area/web Issues and pull requests relating to the Web module bug
Milestone

Comments

@NovaFox161
Copy link
Member

Who is the bug affecting?

Users viewing events in servers that use external calendars and have HTML in their events.

What is affected by this bug?

bot, possibly website, anywhere that displays event content (if website, could potentially lead to XSS)

When does this occur?

Anytime one views and event that contains HTML content

Where on the platform does it happen?

Event view dialogs, potentially announcements and anywhere on the website that shows event content.

How do we replicate the issue?

Have an event that contains HTML content and is then displayed by the bot.

Expected behavior (i.e. solution)

HTML content should be stripped and safe HTML (line breaks, italics, href, etc) should be parsed and displayed safely.

Other Comments

First reported by Danny H on discord.

@NovaFox161 NovaFox161 added bug area/web Issues and pull requests relating to the Web module area/bot Issues and pull requests relating to the Bot module Priority: Immediate Action Needed labels Oct 20, 2020
@NovaFox161 NovaFox161 added this to the v4.1.0 milestone Oct 20, 2020
@NovaFox161
Copy link
Member Author

This will be fixed by using jsoup and parsing out the HTML (except for safe tags) for the web page and when returning in the API.

Internally, we will strip the HTML completely, and replace safe tags with the equivalent markdown code.

I'd like to fit this into 4.1.0, but might have to push this to the next release after that, where I want to work on abstracting out a lot of the API so that 99% of the code base doesn't actually touch google making it easier to integrate into other services such as Apple calendar, ical, Outlook, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bot Issues and pull requests relating to the Bot module area/web Issues and pull requests relating to the Web module bug
Projects
None yet
Development

No branches or pull requests

1 participant