Markdown filter does allow to execute JavaScript by placing <script>...</script> into the body text. Hope the filter avoid to execute the JavaScript code directly or we may want to have the enable/disable option setting.

Comments

frjo’s picture

Component: Code » Documentation
Category: Bug report » Task
Priority: Critical » Normal
Status: Active » Needs work

Markdown filter converts Markdown into HTML. It does not pretend to have any security features. For that you should use filters like "Display any HTML as plain text" or "Limit allowed HTML tags".

This should maybe be clearly stated in the documentation. Any suggestion for how to formulate that?

yas’s picture

@frjo

Actually the problem was found through our penetration test for Drupal site with Markdown filter. I like Markdown filter and I understand it is very helpful; however it is also good to have both Markdown filer feature + "Display any HTML as plain text" or "Limit allowed HTML tags", especially focused on passing through <script>...</script> tag.

yas’s picture

Issue summary: View changes
frjo’s picture

Yes exactly, so please recommend the Drupal site you where testing to enable filters like "Display any HTML as plain text" or "Limit allowed HTML tags" for the Markdown textformat they have..

frob’s picture

isn't this just works as designed? Markdown will let html pass. If you want protection from bad markup use html purifier or something.

frjo’s picture

Status: Needs work » Closed (works as designed)