<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jabbering Giraffe &#187; rant</title>
	<atom:link href="http://happygiraffe.net/blog/tag/rant/feed/" rel="self" type="application/rss+xml" />
	<link>http://happygiraffe.net/blog</link>
	<description></description>
	<lastBuildDate>Tue, 07 Feb 2012 20:49:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>EUNREADABLE</title>
		<link>http://happygiraffe.net/blog/2007/04/09/eunreadable/</link>
		<comments>http://happygiraffe.net/blog/2007/04/09/eunreadable/#comments</comments>
		<pubDate>Mon, 09 Apr 2007 21:23:32 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[style]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2007/04/09/eunreadable/</guid>
		<description><![CDATA[I&#8217;m having a bit of a ranty evening, obviously. But when I see code like this, I give up on the whole article. #include&#60;stdio.h&#62; int main(int argc, char *argv[]) { int i,j,k unsigned long acc=0; for(i=0;i&#60;10000;i++) for(j=0;j&#60;5000;j++) for(k=0;k&#60;4;k++) acc+=k; printf("acc &#8230; <a href="http://happygiraffe.net/blog/2007/04/09/eunreadable/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having a bit of a ranty evening, obviously.  But when I see code like this, I give up on the whole <a href="http://www.onlamp.com/pub/a/onlamp/2007/04/03/getting-familiar-with-gcc-parameters.html">article</a>.</p>
<pre>
  #include&lt;stdio.h&gt;
     int main(int argc, char *argv[])
     {
     int i,j,k
     unsigned long acc=0;
     for(i=0;i&lt;10000;i++)
          for(j=0;j&lt;5000;j++)
                  for(k=0;k&lt;4;k++)
                          acc+=k;
     printf("acc = %lu\n",acc);
     return 0;
     }
</pre>
<p>Really, if you&#8217;re preparing your code for publication, take the time and clean it up so it&#8217;s readable (hint: try pressing the space bar a bit more at a minimum).  An editor won&#8217;t let bad spelling through into the article, so why does bad code get treated with such impunity?</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2007/04/09/eunreadable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cross Site Scripting</title>
		<link>http://happygiraffe.net/blog/2007/04/09/cross-site-scripting/</link>
		<comments>http://happygiraffe.net/blog/2007/04/09/cross-site-scripting/#comments</comments>
		<pubDate>Mon, 09 Apr 2007 20:42:00 +0000</pubDate>
		<dc:creator>Dominic Mitchell</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://happygiraffe.net/2007/04/09/cross-site-scripting/</guid>
		<description><![CDATA[I&#8217;ve just been listening to Security Now about Cross-Site Scripting. It makes my blood boil. No, not all the ads and endless, aimless waffling. The talk about Cross-Site Scripting (aka XSS) being a problem because code and data can be &#8230; <a href="http://happygiraffe.net/blog/2007/04/09/cross-site-scripting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just been listening to <a href="http://www.twit.tv/sn86">Security Now</a> about <a href="http://en.wikipedia.org/wiki/Cross_site_scripting">Cross-Site Scripting</a>.  It makes my blood boil.  No, not all the ads and endless, aimless waffling.  The talk about Cross-Site Scripting (aka <span class="caps">XSS</span>) being a problem because code and data can be intermingled in the page.</p>
<p>No, it&#8217;s not.</p>
<p><span class="caps">XSS</span> is a problem because we have dumb programmers using even dumber tools<sup><a href="#fn1">1</a></sup>.</p>
<p>I&#8217;ve railed <a href="http://happygiraffe.net/blog/archives/2005/11/26/the-wrong-defaults">before</a> about the fact that if you&#8217;re outputting <span class="caps">HTML</span>, then your tool should do <span class="caps">HTML</span> escaping for you <em>by default</em>.</p>
<p>It&#8217;s kind of understandable in systems like <a href="http://www.template-toolkit.org/">Template Toolkit</a>, which are not specifically aimed at the web, but it&#8217;s completely inexcusable in <span class="caps">PHP</span>.  It&#8217;s designed to create web pages.  You&#8217;d think it&#8217;d be able to do it safely and easily.  No chance.</p>
<p>But lest you think I rant at <span class="caps">PHP</span>, most other systems I&#8217;ve seen (in Java, Perl and Ruby) make it nearly as hard to do correctly.  Let me rephrase:</p>
<blockquote>
<p> If you have to think about where to apply escaping, then your tool is letting you down.</p>
</blockquote>
<p>This isn&#8217;t to say <span class="caps">XSS</span> is the only problem.  There are plenty of other problems to be aware of.  <a href="http://en.wikipedia.org/wiki/Cross-site_request_forgery"><span class="caps">CSRF</span></a> appears to be garnering lots of attention these days.</p>
<p>One really useful link did come out of the Security Now show: <a href="http://www.owasp.org/"><span class="caps">OWASP</span></a> (Open Web Application Security Project).  It&#8217;s really worth checking out the <a href="http://www.owasp.org/index.php/OWASP_Guide_Project"><span class="caps">OWASP</span> Guide</a> in order to educate yourself about security on the web.</p>
<p id="fn1"><sup>1</sup>  Before you start to feel offended about being called a &#8220;dumb programmer&#8221;, I most certainly include myself in this category too.</p>
]]></content:encoded>
			<wfw:commentRss>http://happygiraffe.net/blog/2007/04/09/cross-site-scripting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

