News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Sameer Borate's Blog:
Data filtering and validation using Inspekt
March 29, 2011 @ 09:55:27

Sameer Borate has a recent post to his blog looking at an important part of any application - filtering input from the user and output before its used. In his examples he uses a library called Inspekt (from Ed Finkler) to make the job a lot easier.

Most web security glitches are caused by insufficient input filtering and validation. Despite a large number of validation libraries being available, input sanitization is usually bypassed due to sheer laziness or the idea that your site is somehow immune from bad input data. Inspekt is one such library that has a small footprint and is very easy to integrate into your application.

He goes through the installation (a require_once) and a few examples of how to "cage" incoming data from a sample form with two hidden fields. He shows how to use the library to access the filtered versions of the values and how to run some tests on the data (like checks for alphanumeric, valid hostname, between two values, valid phone number, etc). He also briefly mentions "super cages" that can be used over and over.

0 comments voice your opinion now!
data filter tutorial inspekt edfinkler input output test


blog comments powered by Disqus

Similar Posts

Ade Slade's Blog: Integrating Zend Framework 1 and Pimple

The Bakery: Four New Articles - Load Balancing, Request Info, UUID Behavior & Upload Thumbnails

Richard Thomas' Blog: Using jQuery with Solar

Sebastian Bergmann's Blog: Visualizing Text Differences in PHPUnit 3

Till Klampaeckel's Blog: Iterating over a table (with Zend_Db_Table and Zend_Paginator)


Community Events

Don't see your event here?
Let us know!


symfony2 series php7 framework extension laravel performance introduction api conference example library podcast voicesoftheelephpant install version interview community opinion release

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework