<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr</title>
<link>http://snipplr.com/language/php/tags/security</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Sun, 06 Jul 2008 04:11:43 GMT</pubDate>
<item>
<title>(PHP) File: SecurityImage.php - SecurityImage - PHP Classes - ezerick</title>
<link>http://snipplr.com/view/6776/file-securityimagephp--securityimage--php-classes/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 19 Jun 2008 09:07:06 GMT</pubDate>
<guid>http://snipplr.com/view/6776/file-securityimagephp--securityimage--php-classes/</guid>
</item>
<item>
<title>(PHP) File: ProcessForm.php - SecurityImage - PHP Classes - ezerick</title>
<link>http://snipplr.com/view/6775/file-processformphp--securityimage--php-classes/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 19 Jun 2008 09:04:38 GMT</pubDate>
<guid>http://snipplr.com/view/6775/file-processformphp--securityimage--php-classes/</guid>
</item>
<item>
<title>(PHP) File: exampleForm.php - SecurityImage - PHP Classes - ezerick</title>
<link>http://snipplr.com/view/6774/file-exampleformphp--securityimage--php-classes/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 19 Jun 2008 09:03:17 GMT</pubDate>
<guid>http://snipplr.com/view/6774/file-exampleformphp--securityimage--php-classes/</guid>
</item>
<item>
<title>(PHP) Secure Undo magic_quotes - luizlopes</title>
<link>http://snipplr.com/view/6266/secure-undo-magicquotes/</link>
<description><![CDATA[ <p>This was taken out of a presentation by eZ systems on PHP Best Practices</p> ]]></description>
<pubDate>Fri, 16 May 2008 10:31:13 GMT</pubDate>
<guid>http://snipplr.com/view/6266/secure-undo-magicquotes/</guid>
</item>
<item>
<title>(PHP) Encode Email against spammers - iTony</title>
<link>http://snipplr.com/view/5504/encode-email-against-spammers/</link>
<description><![CDATA[ <p>this is not the ultimate secure way, but it's at least not displaying the email link</p> ]]></description>
<pubDate>Thu, 20 Mar 2008 11:40:49 GMT</pubDate>
<guid>http://snipplr.com/view/5504/encode-email-against-spammers/</guid>
</item>
<item>
<title>(PHP) Smart Quoting - AgentPhoenix</title>
<link>http://snipplr.com/view/4758/smart-quoting/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Thu, 24 Jan 2008 10:01:56 GMT</pubDate>
<guid>http://snipplr.com/view/4758/smart-quoting/</guid>
</item>
<item>
<title>(PHP) Anti-SQL Injection Function - llbbl</title>
<link>http://snipplr.com/view/2742/antisql-injection-function/</link>
<description><![CDATA[ <p></p> ]]></description>
<pubDate>Sun, 27 May 2007 11:53:02 GMT</pubDate>
<guid>http://snipplr.com/view/2742/antisql-injection-function/</guid>
</item>
<item>
<title>(PHP) User input validation and security / general security in PHP and programming in general - pckujawa</title>
<link>http://snipplr.com/view/1989/user-input-validation-and-security--general-security-in-php-and-programming-in-general/</link>
<description><![CDATA[ <p>I got most of these tips out of a great book published by O'Reilly (my favorite web-design publisher): &amp;quot;Programming PHP, 2nd Ed.&amp;quot; by Lerdorf, Tatroe, and McIntyre. Another good book is &amp;quot;Essential PHP Security,&amp;quot; also published by O'Reilly.</p> ]]></description>
<pubDate>Tue, 16 Jan 2007 23:02:38 GMT</pubDate>
<guid>http://snipplr.com/view/1989/user-input-validation-and-security--general-security-in-php-and-programming-in-general/</guid>
</item>
<item>
<title>(PHP) Writing secure - berkes</title>
<link>http://snipplr.com/view/1917/writing-secure/</link>
<description><![CDATA[ <p>(A) Better not to create files or folders with user-supplied names. If you do not validate enough, you can have trouble. Instead create files and folders with randomly generated names like fg3754jk3h and store the username and this file or folder name in a table named, say, user_objects. This will ensure that whatever the user may type, the command going to the shell will contain values from a specific set only and no mischief can be done.
 
 (B) The same applies to commands executed based on an operation that the user chooses. Better not to allow any part of the user's input to go to the command that you will execute. Instead, keep a fixed set of commands and based on what the user has input, and run those only. 
 
 For example,
 (A) Keep a table named, say, user_objects with values like:
 username|chosen_name  |actual_name|file_or_dir
 --------|--------------|-----------|-----------
 jdoe    |trekphotos    |m5fg767h67 |D
 jdoe    |notes.txt    |nm4b6jh756 |F
 tim1997 |_imp_ folder  |45jkh64j56 |D
 
 and always use the actual_name in the filesystem operations rather than the user supplied names.</p> ]]></description>
<pubDate>Wed, 03 Jan 2007 13:53:30 GMT</pubDate>
<guid>http://snipplr.com/view/1917/writing-secure/</guid>
</item>
<item>
<title>(PHP) Random validation (CAPTCHA) image - sorehead</title>
<link>http://snipplr.com/view/1356/random-validation-captcha-image/</link>
<description><![CDATA[ <p>Use this script in your contact form, for you whois query tool or just there where some extra validation is needed. A session will be created inside a dynamic image file (requires GD library). The random value of this image appears inside the generated CAPTCHA image. The user has to enter this value into formfield. This value will be checked while processing the form. Without entering this value a form will not be processed.</p> ]]></description>
<pubDate>Mon, 09 Oct 2006 11:36:14 GMT</pubDate>
<guid>http://snipplr.com/view/1356/random-validation-captcha-image/</guid>
</item>
</channel>
</rss>