<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Dr. Woohoo, Generating Artwork, and some Python code to massage user submitted content (specifically, images).</title>
	<atom:link href="http://aralbalkan.com/1458/feed" rel="self" type="application/rss+xml" />
	<link>http://aralbalkan.com/1458</link>
	<description>Passionate geekisms.</description>
	<lastBuildDate>Sun, 12 Feb 2012 17:52:56 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Johnny</title>
		<link>http://aralbalkan.com/1458/comment-page-1#comment-179022</link>
		<dc:creator>Johnny</dc:creator>
		<pubDate>Sat, 23 Aug 2008 08:12:25 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/1458#comment-179022</guid>
		<description>We use a similar system at work as our clients use our own custom bi-lingual CMS to update content on their sites, so the chances are that they will put an image that is way too big and thus breaking the layout. We use .net to re-size the images so that they fit to the exact sizes specified by us.

The django method looks nice, but as we do a lot of public sector work we use .net on our back end. Thankfully as I just design and integrate CSS, I don&#039;t touch that crazy code :)</description>
		<content:encoded><![CDATA[<p>We use a similar system at work as our clients use our own custom bi-lingual CMS to update content on their sites, so the chances are that they will put an image that is way too big and thus breaking the layout. We use .net to re-size the images so that they fit to the exact sizes specified by us.</p>
<p>The django method looks nice, but as we do a lot of public sector work we use .net on our back end. Thankfully as I just design and integrate CSS, I don&#8217;t touch that crazy code :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aral</title>
		<link>http://aralbalkan.com/1458/comment-page-1#comment-178834</link>
		<dc:creator>Aral</dc:creator>
		<pubDate>Fri, 22 Aug 2008 19:43:24 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/1458#comment-178834</guid>
		<description>Hi rajbot,

It&#039;s not unescaped input. It accepts Markdown -- I didn&#039;t think that people would put images in there but they could :) 

And Django escapes everything by default as of 0.97 unless you specifically mark it as &#124;safe.</description>
		<content:encoded><![CDATA[<p>Hi rajbot,</p>
<p>It&#8217;s not unescaped input. It accepts Markdown &#8212; I didn&#8217;t think that people would put images in there but they could :) </p>
<p>And Django escapes everything by default as of 0.97 unless you specifically mark it as |safe.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajbot</title>
		<link>http://aralbalkan.com/1458/comment-page-1#comment-178425</link>
		<dc:creator>rajbot</dc:creator>
		<pubDate>Thu, 21 Aug 2008 14:40:14 +0000</pubDate>
		<guid isPermaLink="false">http://aralbalkan.com/1458#comment-178425</guid>
		<description>Not over-engineering: good, even great.
Allowing unescaped user input: bad

Thinking about and anticipating user input is not over-engineering -- it&#039;s good practice. Essentially, if you were not expecting images in a description, he shouldn&#039;t have been able to post one. This means that you&#039;ve left yourself open to XSS attacks. Sure, your speakers *probably* aren&#039;t going to misuse your website, but the number one rule of thumb is never ever trust user input. Ever. A nice side-effect of this is that your layout rarely gets broken (you still have to look out for non-breaking-lines-such-as-this-one-if-you-know-what-i-mean-right?)

In this case, the more &#039;complicated&#039; way is actually the right way. If you&#039;re serving images, ideally you are serving them from YOUR servers, or from trusted servers. Again, the nice side effect is you can manipulate them using a server-side image API, and deliver a faster and better looking thumb. 

I realize it&#039;s not worth it for this obvious edge case, but something to think about.</description>
		<content:encoded><![CDATA[<p>Not over-engineering: good, even great.<br />
Allowing unescaped user input: bad</p>
<p>Thinking about and anticipating user input is not over-engineering &#8212; it&#8217;s good practice. Essentially, if you were not expecting images in a description, he shouldn&#8217;t have been able to post one. This means that you&#8217;ve left yourself open to XSS attacks. Sure, your speakers *probably* aren&#8217;t going to misuse your website, but the number one rule of thumb is never ever trust user input. Ever. A nice side-effect of this is that your layout rarely gets broken (you still have to look out for non-breaking-lines-such-as-this-one-if-you-know-what-i-mean-right?)</p>
<p>In this case, the more &#8216;complicated&#8217; way is actually the right way. If you&#8217;re serving images, ideally you are serving them from YOUR servers, or from trusted servers. Again, the nice side effect is you can manipulate them using a server-side image API, and deliver a faster and better looking thumb. </p>
<p>I realize it&#8217;s not worth it for this obvious edge case, but something to think about.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

