Re: when rational discussion was still a possibility

Andrei Fangli andrei_fangli at hotmail.com
Sat Sep 6 04:10:14 EDT 2014


True, xss hack prevention is a requirement regardless of where markdown transformation takes place. However…




While on the back end the only concern is xss, while when parsing at the front end and sending it to the server the whole input has to be validated for html and xss.




When accepting posts from users using Markdown as a formatting language there is a chance that someone may simply make a http web request using the action url found in your html post form and send what ever data he wants (assuming the back end expects html, that’s why there’s an extra validation step required at the server when using JavaScript to parse and post the resulted html. I’m not talking about simply checking for well formed html, stripping tags is next after that).





Andrei Fangli





From: Alan Hogan
Sent: ‎Saturday‎, ‎6‎ ‎September‎ ‎2014 ‎10‎:‎59
To: markdown-discuss at six.pairlist.net






> On Sep 6, 2014, at 12:08 AM, Andrei Fangli <andrei_fangli at hotmail.com> wrote:
> 
> The JavaScript version is only good for preview at client-side to avoid posting to the server one to many times. To do client-side parsing and sending it to the server in the final format is a serious security leak (trusting that a post request sends a valid and harmless html is wishful thinking).

There’s little difference: if you are accepting markdown from untrusted users, you MUST also pass the resulting HTML through an XSS filter of some sort, no matter whether the markdown transform happens on the front or back end. 

Alan
_______________________________________________
Markdown-Discuss mailing list
Markdown-Discuss at six.pairlist.net
http://six.pairlist.net/mailman/listinfo/markdown-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://six.pairlist.net/pipermail/markdown-discuss/attachments/20140906/3ce85f4c/attachment.html>


More information about the Markdown-Discuss mailing list