<?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/"
		>
<channel>
	<title>Comments for MiracleBlue&#039;s Awesome Blog!</title>
	<atom:link href="http://pie.miracleblue.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://pie.miracleblue.com</link>
	<description>Web Development, Electronic Music and Skateboarding (now with 9001% more Awesome)</description>
	<lastBuildDate>Thu, 25 Feb 2010 19:02:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by Looie</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-24</link>
		<dc:creator>Looie</dc:creator>
		<pubDate>Thu, 25 Feb 2010 19:02:09 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-24</guid>
		<description>Come on Nick, you can&#039;t let RoR beat PHP!</description>
		<content:encoded><![CDATA[<p>Come on Nick, you can&#8217;t let RoR beat PHP!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by Havokade</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-23</link>
		<dc:creator>Havokade</dc:creator>
		<pubDate>Wed, 20 Jan 2010 21:30:02 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-23</guid>
		<description>echo &quot;mY c0d3 i$ 2 31337 4 u xP&quot;;</description>
		<content:encoded><![CDATA[<p>echo &#8220;mY c0d3 i$ 2 31337 4 u xP&#8221;;</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by modsognir</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-22</link>
		<dc:creator>modsognir</dc:creator>
		<pubDate>Sun, 10 Jan 2010 13:01:38 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-22</guid>
		<description>oh, to make things more condensed:
%w{home about contact destroyhumans}.include(@page) ? redirect_to @page : render :status=&gt;404</description>
		<content:encoded><![CDATA[<p>oh, to make things more condensed:<br />
%w{home about contact destroyhumans}.include(@page) ? redirect_to @page : render :status=&gt;404</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by modsognir</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-21</link>
		<dc:creator>modsognir</dc:creator>
		<pubDate>Sun, 10 Jan 2010 12:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-21</guid>
		<description>[&#039;home&#039;, &#039;about&#039;, &#039;contact&#039;, &#039;destroyhumans&#039;].include?(@page) ? redirect_to :action=&gt;@page : render :status=&gt;404</description>
		<content:encoded><![CDATA[<p>['home', 'about', 'contact', 'destroyhumans'].include?(@page) ? redirect_to :action=&gt;@page : render :status=&gt;404</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by MiracleBlue</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-20</link>
		<dc:creator>MiracleBlue</dc:creator>
		<pubDate>Sun, 10 Jan 2010 12:22:38 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-20</guid>
		<description>That&#039;s pretty cool.  Here&#039;s a more condensed version of it in PHP...

(in_array($page, array(&quot;home&quot;,&quot;about&quot;,&quot;contact&quot;,&quot;destroyhumans&quot;)) ? include($dir.&quot;/&quot;.$page.&quot;/php&quot;) : include($dir.&quot;/404.php&quot;)</description>
		<content:encoded><![CDATA[<p>That&#8217;s pretty cool.  Here&#8217;s a more condensed version of it in PHP&#8230;</p>
<p>(in_array($page, array(&#8220;home&#8221;,&#8221;about&#8221;,&#8221;contact&#8221;,&#8221;destroyhumans&#8221;)) ? include($dir.&#8221;/&#8221;.$page.&#8221;/php&#8221;) : include($dir.&#8221;/404.php&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by modsognir</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-19</link>
		<dc:creator>modsognir</dc:creator>
		<pubDate>Sun, 10 Jan 2010 12:19:04 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-19</guid>
		<description>In rails you can condense it to something like this (and i&#039;m stretching it out a little)

@page = params[:page]

if [&#039;home&#039;, &#039;about&#039;, &#039;contact&#039;, &#039;destroyhumans&#039;].include?(@page)
  redirect_to :action =&gt; @page
else
  render :status =&gt; 404
end</description>
		<content:encoded><![CDATA[<p>In rails you can condense it to something like this (and i&#8217;m stretching it out a little)</p>
<p>@page = params[:page]</p>
<p>if ['home', 'about', 'contact', 'destroyhumans'].include?(@page)<br />
  redirect_to :action =&gt; @page<br />
else<br />
  render :status =&gt; 404<br />
end</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by MiracleBlue</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-18</link>
		<dc:creator>MiracleBlue</dc:creator>
		<pubDate>Sun, 10 Jan 2010 12:10:06 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-18</guid>
		<description>But *I* *LOVE* asterisks!  *!!!*
=P
And no, it wouldn&#039;t be all that difficult at all to do a whitelist.  All you&#039;d need to do is make an array.  For example...

$whitelist = array(&quot;home&quot;, &quot;about&quot;, &quot;contact&quot;, &quot;destroyhumans&quot;);
if (in_array($page, $whitelist)) {
    include($dir.&quot;/&quot;.$page.&quot;.php&quot;);
}
else {
    include($dir.&quot;/404.php&quot;);
}</description>
		<content:encoded><![CDATA[<p>But *I* *LOVE* asterisks!  *!!!*<br />
=P<br />
And no, it wouldn&#8217;t be all that difficult at all to do a whitelist.  All you&#8217;d need to do is make an array.  For example&#8230;</p>
<p>$whitelist = array(&#8220;home&#8221;, &#8220;about&#8221;, &#8220;contact&#8221;, &#8220;destroyhumans&#8221;);<br />
if (in_array($page, $whitelist)) {<br />
    include($dir.&#8221;/&#8221;.$page.&#8221;.php&#8221;);<br />
}<br />
else {<br />
    include($dir.&#8221;/404.php&#8221;);<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Security: The mindset of a secure programmer by modsognir</title>
		<link>http://pie.miracleblue.com/2010/01/09/security-the-mindset-of-a-secure-programmer/comment-page-1/#comment-17</link>
		<dc:creator>modsognir</dc:creator>
		<pubDate>Sun, 10 Jan 2010 11:08:57 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=43#comment-17</guid>
		<description>I think its good. Maybe a bit much emphasis using asterisks.

In terms of the last section, I would also suggest using a whitelist of sorts - theres only so many pages that could be included, its worth testing if its one of those. If its not, throw a 404. Maybe a bit harder in php for lots of pages. 

ah if only this was ruby :)</description>
		<content:encoded><![CDATA[<p>I think its good. Maybe a bit much emphasis using asterisks.</p>
<p>In terms of the last section, I would also suggest using a whitelist of sorts &#8211; theres only so many pages that could be included, its worth testing if its one of those. If its not, throw a 404. Maybe a bit harder in php for lots of pages. </p>
<p>ah if only this was ruby <img src='http://pie.miracleblue.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Classes: A very quick guide to the basics by MiracleBlue</title>
		<link>http://pie.miracleblue.com/2009/03/06/php-classes-a-very-quick-guide-to-the-basics/comment-page-1/#comment-16</link>
		<dc:creator>MiracleBlue</dc:creator>
		<pubDate>Fri, 08 Jan 2010 12:38:22 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=26#comment-16</guid>
		<description>Coming in a later tutorial, when I can be bothered =]</description>
		<content:encoded><![CDATA[<p>Coming in a later tutorial, when I can be bothered =]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on PHP Classes: A very quick guide to the basics by ringosdom</title>
		<link>http://pie.miracleblue.com/2009/03/06/php-classes-a-very-quick-guide-to-the-basics/comment-page-1/#comment-15</link>
		<dc:creator>ringosdom</dc:creator>
		<pubDate>Fri, 08 Jan 2010 10:35:54 +0000</pubDate>
		<guid isPermaLink="false">http://pie.miracleblue.com/?p=26#comment-15</guid>
		<description>but wheres the multiple inheritance and polymorphism?</description>
		<content:encoded><![CDATA[<p>but wheres the multiple inheritance and polymorphism?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

