<?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 on: Mass SQL Injection attack</title>
	<atom:link href="http://rc3.org/2008/04/27/mass-sql-injection-attack/feed/" rel="self" type="application/rss+xml" />
	<link>http://rc3.org/2008/04/27/mass-sql-injection-attack/</link>
	<description>Strong opinions weakly held</description>
	<lastBuildDate>Fri, 10 Feb 2012 14:59:55 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: http://wasabi.homelinux.com/</title>
		<link>http://rc3.org/2008/04/27/mass-sql-injection-attack/comment-page-1/#comment-2684</link>
		<dc:creator>http://wasabi.homelinux.com/</dc:creator>
		<pubDate>Sun, 25 May 2008 20:19:24 +0000</pubDate>
		<guid isPermaLink="false">http://rc3.org/?p=8211#comment-2684</guid>
		<description>&lt;p&gt;Php all together needs to be avoided&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Php all together needs to be avoided</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sencer</title>
		<link>http://rc3.org/2008/04/27/mass-sql-injection-attack/comment-page-1/#comment-2618</link>
		<dc:creator>Sencer</dc:creator>
		<pubDate>Sat, 03 May 2008 10:47:41 +0000</pubDate>
		<guid isPermaLink="false">http://rc3.org/?p=8211#comment-2618</guid>
		<description>&lt;blockquote&gt;
  &lt;p&gt;should sanitize all input by default and force 
  programmers to go out of their way to access the 
  original input&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;sanitize it for what? For output to the web? for usage in sql queries? If the latter, for which databases, and which charactersets should be assumed? My point is there is too many variables to make it automatic.&lt;/p&gt;

&lt;p&gt;@Simon:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;(some environments call these prepared 
  statements, but you can simulate them with 
  anything just by writing a simple function).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and please, please, people who do that make sure that the function does more than simply glue string togethers without any further checks or escaping, otherwise you&#039;ve only obfuscated the problem in the code, but exploiting is as easy as it was before. (Yes, I&#039;ve seen it often enough...)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<blockquote>
  <p>should sanitize all input by default and force 
  programmers to go out of their way to access the 
  original input</p>
</blockquote>

<p>sanitize it for what? For output to the web? for usage in sql queries? If the latter, for which databases, and which charactersets should be assumed? My point is there is too many variables to make it automatic.</p>

<p>@Simon:</p>

<blockquote>
  <p>(some environments call these prepared 
  statements, but you can simulate them with 
  anything just by writing a simple function).</p>
</blockquote>

<p>and please, please, people who do that make sure that the function does more than simply glue string togethers without any further checks or escaping, otherwise you&#8217;ve only obfuscated the problem in the code, but exploiting is as easy as it was before. (Yes, I&#8217;ve seen it often enough&#8230;)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Adams</title>
		<link>http://rc3.org/2008/04/27/mass-sql-injection-attack/comment-page-1/#comment-2611</link>
		<dc:creator>Chris Adams</dc:creator>
		<pubDate>Sun, 27 Apr 2008 20:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://rc3.org/?p=8211#comment-2611</guid>
		<description>&lt;p&gt;Simon: I agree completely about using placeholders but I think the problem with PHP was that it wasn&#039;t consistent and a lot of code was written which made dangerous assumptions about the magic quotes behavior. It wouldn&#039;t have been perfect but the web would be safer if PHP had default escaping for input and output.&lt;/p&gt;

&lt;p&gt;If I could wave a magic wand for PHP6 I&#039;d make a few backwards-incompatible changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input data would be tainted and functions which aren&#039;t marked as taint-safe would throw exceptions.&lt;/li&gt;
&lt;li&gt;Output data would be HTML-escaped by default and the raw-output function would be have a discomforting name like &lt;code&gt;insecure_output&lt;/code&gt;. &lt;/li&gt;
&lt;li&gt;PDO and all other database classes would have their syntax improved to make parameters available without prepared statement overhead: it&#039;s &lt;a href=&quot;http://svn.improbable.org/ImpUtils/trunk/ImpPDO.php&quot; rel=&quot;nofollow&quot;&gt;pretty easy to subclass PDO for this&lt;/a&gt; but it should be standard.&lt;/li&gt;
&lt;/ul&gt;
</description>
		<content:encoded><![CDATA[<p>Simon: I agree completely about using placeholders but I think the problem with PHP was that it wasn&#8217;t consistent and a lot of code was written which made dangerous assumptions about the magic quotes behavior. It wouldn&#8217;t have been perfect but the web would be safer if PHP had default escaping for input and output.</p>

<p>If I could wave a magic wand for PHP6 I&#8217;d make a few backwards-incompatible changes:</p>

<ul>
<li>Input data would be tainted and functions which aren&#8217;t marked as taint-safe would throw exceptions.</li>
<li>Output data would be HTML-escaped by default and the raw-output function would be have a discomforting name like <code>insecure_output</code>. </li>
<li>PDO and all other database classes would have their syntax improved to make parameters available without prepared statement overhead: it&#8217;s <a href="http://svn.improbable.org/ImpUtils/trunk/ImpPDO.php" rel="nofollow">pretty easy to subclass PDO for this</a> but it should be standard.</li>
</ul>]]></content:encoded>
	</item>
	<item>
		<title>By: Simon Willison</title>
		<link>http://rc3.org/2008/04/27/mass-sql-injection-attack/comment-page-1/#comment-2610</link>
		<dc:creator>Simon Willison</dc:creator>
		<pubDate>Sun, 27 Apr 2008 19:05:09 +0000</pubDate>
		<guid isPermaLink="false">http://rc3.org/?p=8211#comment-2610</guid>
		<description>&lt;p&gt;Sanitizing user input, while essential, is the incorrect way to avoid SQL injection in my opinion. SQL injection is caused by gluing strings together to create SQL queries. In this day and age there is absolutely no excuse for doing this - you should be using a database library that takes a SQL statement with placeholders and the values for those placeholders separately (some environments call these prepared statements, but you can simulate them with anything just by writing a simple function).&lt;/p&gt;

&lt;p&gt;PHP originally escaped input by default, and it took YEARS for the community to recover from the mess that it caused!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sanitizing user input, while essential, is the incorrect way to avoid SQL injection in my opinion. SQL injection is caused by gluing strings together to create SQL queries. In this day and age there is absolutely no excuse for doing this &#8211; you should be using a database library that takes a SQL statement with placeholders and the values for those placeholders separately (some environments call these prepared statements, but you can simulate them with anything just by writing a simple function).</p>

<p>PHP originally escaped input by default, and it took YEARS for the community to recover from the mess that it caused!</p>]]></content:encoded>
	</item>
</channel>
</rss>

