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

Link allows javascript which could lead to XSS issues #497

Closed
lin-toto opened this issue May 2, 2017 · 3 comments · Fixed by #495
Closed

Link allows javascript which could lead to XSS issues #497

lin-toto opened this issue May 2, 2017 · 3 comments · Fixed by #495

Comments

@lin-toto
Copy link

lin-toto commented May 2, 2017

So I don't know if this is a bug or an expected feature, so please correct me if I'm wrong, but I found that I actually can write javascript links like this:

[test](javascript:alert%281%29)

An alert does pop out and this behavior is actually disallowed in GitHub.

People can do nasty things if a victim does click on one of these links.

@aidantwoods
Copy link
Collaborator

I've proposed some changes to parsedown here to prevent that #495, which you can grab a little early from here https://github.com/aidantwoods/parsedown/tree/anti-xss

Just be sure to set

$Parsedown->setMarkupEscaped(true);

To disable HTML tags (since the markdown language permits HTML by default).

Lastly if you're willing to test that version, feedback is welcome/encouraged :).

@lin-toto
Copy link
Author

lin-toto commented May 2, 2017

@aidantwoods cool, thanks. I think people will want your PR in master, to keep things safer.

I'll grab your version and inform you if I find any issues.

@sergeysviridenko
Copy link

@erusev what about this problem? Will it solve?

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

Successfully merging a pull request may close this issue.

3 participants