<?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: 24/09 &#8211; Dev :: Key-hash Security</title> <atom:link href="http://www.evohosting.co.uk/blog/web-development/security/key-hash-security/feed/" rel="self" type="application/rss+xml" /><link>http://www.evohosting.co.uk/blog/web-development/security/key-hash-security/</link> <description>UK Web Hosting</description> <lastBuildDate>Thu, 09 Feb 2012 00:13:22 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency><meta
name="generator" content="Obscure 2.0" /> <item><title>By: Konstantin</title><link>http://www.evohosting.co.uk/blog/web-development/security/key-hash-security/comment-page-1/#comment-3930</link> <dc:creator>Konstantin</dc:creator> <pubDate>Wed, 18 Mar 2009 08:37:11 +0000</pubDate> <guid
isPermaLink="false">http://www.evohosting.co.uk/blog/?p=119#comment-3930</guid> <description>Thanks for security key</description> <content:encoded><![CDATA[<p>Thanks for security key</p> ]]></content:encoded> </item> <item><title>By: Jan-Erik L.</title><link>http://www.evohosting.co.uk/blog/web-development/security/key-hash-security/comment-page-1/#comment-3622</link> <dc:creator>Jan-Erik L.</dc:creator> <pubDate>Fri, 10 Oct 2008 12:24:59 +0000</pubDate> <guid
isPermaLink="false">http://www.evohosting.co.uk/blog/?p=119#comment-3622</guid> <description>&lt;strong&gt;Thank you guys for the comments!&lt;/strong&gt;
Cleaning up input before processing it is very important (and should not be forgotten!). You can use the following script to do it very quickly:
&lt;code&gt;
&lt;?PHP
foreach ($_POST as $key =&gt; $value) {
if (empty($_POST[$key])) {$_POST[$key] = NULL;}
$_POST[$key] = addslashes($value);
}
?&gt;
&lt;/code&gt;
This is again just a very basic script but it will save you a load of code and does the job pretty well. If you&#039;re doing this check within a MySQL connection I would suggest also running &lt;a href=&quot;http://se.php.net/mysql_real_escape_string&quot; rel=&quot;nofollow&quot;&gt;mysql_real_escape_string()&lt;/a&gt;.</description> <content:encoded><![CDATA[<p><strong>Thank you guys for the comments!</strong></p><p>Cleaning up input before processing it is very important (and should not be forgotten!). You can use the following script to do it very quickly:</p><p><code><br
/> < ?PHP<br
/> foreach ($_POST as $key => $value) {<br
/> if (empty($_POST[$key])) {$_POST[$key] = NULL;}</p><p> $_POST[$key] = addslashes($value);<br
/> }<br
/> ?><br
/> </code></p><p>This is again just a very basic script but it will save you a load of code and does the job pretty well. If you&#8217;re doing this check within a MySQL connection I would suggest also running <a
href="http://se.php.net/mysql_real_escape_string">mysql_real_escape_string()</a>.</p> ]]></content:encoded> </item> <item><title>By: Sven</title><link>http://www.evohosting.co.uk/blog/web-development/security/key-hash-security/comment-page-1/#comment-3620</link> <dc:creator>Sven</dc:creator> <pubDate>Tue, 07 Oct 2008 11:20:23 +0000</pubDate> <guid
isPermaLink="false">http://www.evohosting.co.uk/blog/?p=119#comment-3620</guid> <description>Although this is a nice solution to ensure that the POST data comes from a valid source (i.e. the originating form) it is still quite easy to manipulate the data in between whilst maintaining a valid hash. It does, as you state, stop most &quot;script kiddies&quot;. but you will still need to do something else very important: Clean and verify the input before processing it.
I must say though, I like the idea of adding a unique hash to data to verify its integrity. You could make good use of that to prevent cookie modification hacks by &quot;checksumming&quot; the data before populating the cookie.
Good tip :)</description> <content:encoded><![CDATA[<p>Although this is a nice solution to ensure that the POST data comes from a valid source (i.e. the originating form) it is still quite easy to manipulate the data in between whilst maintaining a valid hash. It does, as you state, stop most &#8220;script kiddies&#8221;. but you will still need to do something else very important: Clean and verify the input before processing it.</p><p>I must say though, I like the idea of adding a unique hash to data to verify its integrity. You could make good use of that to prevent cookie modification hacks by &#8220;checksumming&#8221; the data before populating the cookie.</p><p>Good tip <img
src='http://www.evohosting.co.uk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> </item> <item><title>By: Orlando</title><link>http://www.evohosting.co.uk/blog/web-development/security/key-hash-security/comment-page-1/#comment-3594</link> <dc:creator>Orlando</dc:creator> <pubDate>Sun, 28 Sep 2008 17:14:20 +0000</pubDate> <guid
isPermaLink="false">http://www.evohosting.co.uk/blog/?p=119#comment-3594</guid> <description>many thanks for this, this will come in handy!!!</description> <content:encoded><![CDATA[<p>many thanks for this, this will come in handy!!!</p> ]]></content:encoded> </item> </channel> </rss>
