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

use remarkable instead of remarked for previewing to prevent XSS content #437

Closed
wants to merge 3 commits into from

Conversation

wisetwo
Copy link

@wisetwo wisetwo commented Sep 22, 2016

When the input string contains html content, 'marked' would simply render them as actual html entities, thus bring wired previewing effect. For example, when we input strings like <textarea>123</textarea>, preview would show an actual textarea input, script tag will also be rendered as well. If the content is user generated, it's likely to make the users feel that there could be a XSS vulnerability.

Should we change it with 'remarkable' with html option set to false to avoid this?

@sparksuite-bot
Copy link
Collaborator

Thanks for helping to contribute to SimpleMDE. However, it looks like you haven't read the Contributing Guidelines yet because you compared this PR against the master branch.

The most important guideline for contributing is to compare against the development branch when creating a pull request.

First, read the Contributing Guidelines. Then you can submit a new PR that compares your commits against the development branch. This PR will now be closed.

@TangentFoxy
Copy link

As was stated on a recent issue (#435), this project is not supposed to protect against XSS. It is up to the developer to implement this on their side.

@raminfp
Copy link

raminfp commented Sep 22, 2016

Thanks, i need fix for this issue,i see this your PR, Do you have performed test protect against XSS?

@TangentFoxy
Copy link

@raminfp You're mentioning the wrong guy. I don't have any PR's.

@raminfp
Copy link

raminfp commented Sep 23, 2016

@Guard13007 Oh, you are right, i so sorry

@wisetwo
Copy link
Author

wisetwo commented Sep 23, 2016

@Guard13007 OK, so if we want to use simplemde for public users, we can only customise its markdown parser.
Got it, thanks.

@wisetwo
Copy link
Author

wisetwo commented Sep 23, 2016

@raminfp This PR has few lines of code and I have tested through possible XSS attack situations that I konw, you can have a try : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants