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

Clean rendered content #1

Open
cdriehuys opened this issue Dec 19, 2018 · 1 comment
Open

Clean rendered content #1

cdriehuys opened this issue Dec 19, 2018 · 1 comment
Labels
enhancement New feature or request

Comments

@cdriehuys
Copy link
Member

Right now we are trusting that users who can access the admin site to create content will not do anything malicious. The current behavior allows users to input <script> tags into their content which could lead to all sorts of XSS attacks. This issue will become especially concerning if we expand to allow user comments or anything like that.

The workaround is to use something like bleach to remove any HTML tags in the rendered output that aren't on a whitelist. Because of the extra work rendering will take, it might be smart to start storing the rendered version of a post in the database and recomputing it if the markdown content changes.

@cdriehuys cdriehuys added the enhancement New feature or request label Dec 19, 2018
@cdriehuys
Copy link
Member Author

Cleaning the content should also produce a plain text version of the content that can be used to search through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant