<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 00:40:03 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Rafael Dohms' Blog: Filtering objects using annotations]]></title>
      <guid>http://www.phpdeveloper.org/news/16710</guid>
      <link>http://www.phpdeveloper.org/news/16710</link>
      <description><![CDATA[<p>
<i>Rafael Dohms</i> has an interesting new post to his site today looking at a library he's developed (inspired by the Symfony Validation library) to help <a href="http://blog.rafaeldohms.com.br/2011/08/11/filtering-objects-using-annotations/">filtering values with rules defined in annotations</a>.
</p>
<blockquote>
PHP does not have native Annotations support, however many projects have been using doc blocks to add value and semantics to code, like PHPUnit, Doctrine and Symfony. The Doctrine did a really good job in making available a Annotation parser kit, which allows you to bring the power of annotations into you own project. This opens up a few possibilities.
</blockquote>
<p>
He shows the current use of the Validation library with a sample check of a $name variable for "not blank". <a href="https://github.com/rdohms/DMS">His tool, DMS,</a> extends this functionality and gives you access to both custom filtering methods and standard PHP functions to filter the resulting variable value. He includes an example showing two variables with filters StripTags, StripNewlines and Trim as well as the code to execute the filtering. You can get the library either ready to <a href="https://github.com/rdohms/DMS">integrate with Symfony/Doctrine</a> or as <a href="https://github.com/rdohms/DMS-Filter">a standalone tool</a>.
</p>]]></description>
      <pubDate>Fri, 12 Aug 2011 10:04:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Juozas Kaziukenas' Blog: HTML filtering and XSS protection]]></title>
      <guid>http://www.phpdeveloper.org/news/12186</guid>
      <link>http://www.phpdeveloper.org/news/12186</link>
      <description><![CDATA[<p>
<i>Juozas Kaziukenas</i> has <a href="http://dev.juokaz.com/php/html-filtering-and-xss-protection">an example</a> of how to keep you and your application's data safe from prying eyes by filtering input with the <a href="http://htmlpurifier.org/">HTML_Purifier</a> package.
</p>
<blockquote>
It's really hard to decide what data is acceptable, especially when user has permission to insert HTML content through form. [...] However, problem can be solved, and quite easily. Almost a year ago I was reading some random blog when I find out about <a href="http://htmlpurifier.org/">HTML Purifier</a>. Basically, it's library which can filter and fix any HTML. 
</blockquote>
<p>
He gives an example - running a web scraping tool against a site with malformed HTML. By running it through the HTML_Purifier package first, the errors were corrected and the "more correct" HTML source could be parsed easily. The package also helps to protect from XSS attacks via a <a href="http://htmlpurifier.org/live/smoketests/xssAttacks.php">whole set of filters</a> included by default.
</p>]]></description>
      <pubDate>Mon, 23 Mar 2009 10:21:49 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stubbles Blog: Stubbles 0.1.0 released]]></title>
      <guid>http://www.phpdeveloper.org/news/7735</guid>
      <link>http://www.phpdeveloper.org/news/7735</link>
      <description><![CDATA[<p>
The Stubbles framework team has <a href="http://www.stubbles.org/archives/17-Stubbles-0.1.0-released.html">released the latest version</a> of their framework today - Stubbles 0.1.0:
</p>
<blockquote>
The Stubbles team is proud to announce the release of Stubbles 0.1.0. This release is a first alpha version and contains the basic features of Stubbles like the <a href="http://stubbles.net/wiki/Docs/Reflection">Extended Reflection API</a>, XML handling with <a href="http://stubbles.net/wiki/Docs/XMLStreamWriter">XMLStreamWriter</a> and <a href="http://stubbles.net/wiki/Docs/XMLSerializer">XMLSerializer</a>, <a href="http://stubbles.net/wiki/Docs/Logging">Logging</a>, <a href="http://stubbles.net/wiki/Docs/EventHandling">Event handling</a>, <a href="http://stubbles.net/wiki/Docs/Validators">support for filtering and validating user input</a> and <a href="http://stubbles.net/wiki/Docs/Session">session handling</a>. The release additionally contains parts of packages that we announced to be in the next milestone 0.2.0. 
</blockquote>
<p>
The <a href="http://stubbles.net/">Stubbles framework</a> is one that seeks to "combine your favorite features from other programming languages and frameworks" and is flexible enough to allow for easy interfacing with other frameworks/components like <a href="http://pear.php.net">PEAR</a> or the <a href="http://framework.zend.com">Zend Framework</a>.
</p>]]></description>
      <pubDate>Mon, 30 Apr 2007 13:07:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Two Security Tips - Naming Scheme & Input Filtering]]></title>
      <guid>http://www.phpdeveloper.org/news/7408</guid>
      <link>http://www.phpdeveloper.org/news/7408</link>
      <description><![CDATA[<p>
The Zend Developer Zone has posted two more handy security tips - <a href="http://devzone.zend.com/node/view/id/1761">one</a> concerning file/directory naming and <a href="http://devzone.zend.com/node/view/id/1767">the other</a> about input validation.
</p>
<p>
From <a href="http://devzone.zend.com/node/view/id/1761">the first tip</a>:
</p>
<blockquote>
Don't rely on obscure names to keep your application safe. You should always check permissions, test for vulnerabilities with testing tools and keep an eye on your log files for suspicious activity. When designing your applications and web sites though, don't make it easy for bad people to do bad things. Don't use default or common names for your files and directories.
</blockquote>
<p>
And from <a href="http://devzone.zend.com/node/view/id/1767">the second</a>:
</p>
<blockquote>
It's a sad fact of life but users are evil. Users want nothing more than to find a way to exploit your application. As soon as you let your guard down and start thinking "I'm only selling small stuffed animals so how evil can my users really be?" you've lost the battle.
</blockquote>
<p>
You can catch up on these and the other previous security tips on <a href="http://devzone.zend.com/public/view/tag/Security_Tips">this page</a> on the Zend Developer Zone website.
</p>]]></description>
      <pubDate>Thu, 08 Mar 2007 09:26:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: PHP Built in Input filtering]]></title>
      <guid>http://www.phpdeveloper.org/news/6613</guid>
      <link>http://www.phpdeveloper.org/news/6613</link>
      <description><![CDATA[<p>
The Zend Developer Zone has <a href="http://devzone.zend.com/node/view/id/1113">a new tutorial</a> posted today by <i>Pierre</i> dealing with one of the things becoming (and should have always been) important to PHP developers - filtering input. Specifically, it deals with using the Filter extension built into PHP 5 to take care of anything malicious or incorrect that the user might throw at the application.
</p>
<blockquote>
Security becomes the top priority (or activity) of many PHP developers. Its place and importance keeps growing in every single project, open source or commercial. Every conference provides a talk about security and you can read PHP security on the magazine cover pages.
</blockquote>
<p>
<a href="http://devzone.zend.com/node/view/id/1113">The article</a> is broken down into different sections, including:
<ul>
<li>Don't trust external data
<li>Why Filter?
<li>How does it work?
<li>Prerequises/Installation/Considerations
</ul>
And, of course, what would a tutorial be without some examples. <i>Pierre</i> shows a simple form that filters, a sanitizing form, and some more complex processing using a callback.
</p>]]></description>
      <pubDate>Tue, 31 Oct 2006 12:51:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Metapundit.net: Code Smells II]]></title>
      <guid>http://www.phpdeveloper.org/news/6582</guid>
      <link>http://www.phpdeveloper.org/news/6582</link>
      <description><![CDATA[<p>
Following up from the <a href="http://metapundit.net/sections/blog/code_smells_and_design_principles">previous article</a> on the Metapundit.net blog, there's <a href="http://metapundit.net/sections/blog/148">part two</a> of the "Code Smells" series - a look at bad things to do in your code (to make it "smell").
</p>
<blockquote>
This (and any subsequent posts in the series) will be more limited in scope - a single bad example and a corresponding solution.
</blockquote>
<p>
This time, <a href="http://metapundit.net/sections/blog/148">the spotlight</a> is on parameterised queries - inserting the variables directly into a SQL statement string versus filtering them or inserting them via a custom query() function. He points out that there's no need to create this kind of filtering/database handling class on your own, though - there's already been one created by the fine folks of PEAR (using the <a href="http://pear.php.net/manual/en/package.database.db.db-common.autoexecute.php">autoExecute function</a).
</p>]]></description>
      <pubDate>Thu, 26 Oct 2006 09:14:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jacob Santos' Blog: The Sexy Filter Extension and Fear of Regex]]></title>
      <guid>http://www.phpdeveloper.org/news/5879</guid>
      <link>http://www.phpdeveloper.org/news/5879</link>
      <description><![CDATA[<p>
<i>Jacob Santos</i> has posted <a href="http://www.santosj.name/?p=249">a new entry on his blog</a> today with his own take on regular expressions and their collaboration with the <a href="http://www.php.net/filter">Filter extension</a> in PHP.
</p>
<blockquote>
<p>
Regular Expressions are a powerful way to parse and evaluate strings. They can be fun sometimes, but there is rarely an indication of the reason why they fail.
</p>
<p>
I knew it would be satisfying, once I seen <a href="http://www.php.net/filter">this (the Filter extension)</a> in passing on the php.net site. It uses the procedural method, which I think fits perfectly. If you try to throw objects at a novice than most aren't likely to use what you give. It is really simple to use, so there is no longer any excuse for an developer to not be using it, if using PHP 5.2+.
</p>
</blockquote>
<p>
He <a href="http://www.santosj.name/?p=249">gives examples</a> of email validation methods both with and without the Filter extension, making it abundantly clear which is easier - a simple call to filter_data validates with no muss or fuss.
</p>]]></description>
      <pubDate>Wed, 26 Jul 2006 06:24:13 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: PHP Filtering with OWASP]]></title>
      <guid>http://www.phpdeveloper.org/news/5724</guid>
      <link>http://www.phpdeveloper.org/news/5724</link>
      <description><![CDATA[<p>
On PHPBuilder.com today, there's a <a href="http://www.phpbuilder.com/columns/ryan_mcgeehan20060627.php3">new tutorial</a> that looks at a method to protect your PHP applications with the filters the Open Web Application Security Project provides.
</p>
<blockquote>
<p>
OWASP (Open Web Application Security Project ) released a top ten list for web application security vulnerabilities in 2003 and 2004; you can find the latest information about their Top Ten Project <a href="http://www.owasp.org/index.php/OWASP_Top_Ten_Project">here</a>.
</p>
<p>
Most of the top ten vulnerabilities including (A1) Unvalidated Input, (A2) Broken Access Control, (A4) Cross Site Scripting (XSS) Flaws, and (A6) Injection Flaws, can be avoided by using these filters.
</p>
</blockquote>
<p>
They <a href="http://www.phpbuilder.com/columns/ryan_mcgeehan20060627.php3">walk through the installation</a> before talking about the types of filters at your disposal - paranoid, SQL, system, HTML, int/float, UTF-8, and LDAP. The check() function looks at the inputted value to see if it passes the test (the other option the function takes).
</p>
<p>
They also give an example of <a href="http://www.phpbuilder.com/columns/ryan_mcgeehan20060627.php3?page=2">combining filters</a> as well, making more secure validation even easier.
</p>]]></description>
      <pubDate>Thu, 29 Jun 2006 06:15:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: Filtering & Escaping Cheat Sheet]]></title>
      <guid>http://www.phpdeveloper.org/news/5409</guid>
      <link>http://www.phpdeveloper.org/news/5409</link>
      <description><![CDATA[<p>
<i>Davey Shafik</i> <a href="http://pixelated-dreams.com/archives/231-Filtering-Escaping-Cheat-Sheet.html">has created</a> a cheat sheet useful for any developer out there using a database, one to remind you of the filtering and escaping techniques to use before putting data into your database or outputting it to your site.
</p>
<quote>
<i>
<p>
After having two conversation on escaping data for MySQL? insertion within 5 minutes of each other in ##php@freenode, I decided to created a cheat sheet on Filtering & Escaping in general.
</p>
<p>
I think what most people are not aware of is that not just outputting to the browser is output. So it querying a database, or calling one of the exec functions, or even using the mail function (not mentioned on the cheat sheet, perhaps for v2.
</p>
</i>
</quote>
<p>
You can grab the <a href="http://pixelated-dreams.com/uploads/misc/cheatsheets/FilteringAndEscapingCheatSheet.pdf">cheat sheet here</a> in a PDF format.
</p>]]></description>
      <pubDate>Mon, 22 May 2006 05:42:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Preventing spam when using PHP's mail function]]></title>
      <guid>http://www.phpdeveloper.org/news/5165</guid>
      <link>http://www.phpdeveloper.org/news/5165</link>
      <description><![CDATA[<p>
Spam has grown into one of the worst problems on the internet today. It effects everyone, even those that guard their email addresses with their lives. Information spreads so fluidly in the bits and bytes of everyday communication, that it's almost inevitable for your address to get out. Once it's out, you'll know, getting emails from people you don't know offering things you don't want. One tool spammers can use, unfortunately, are the unsecured forms on your own site. Thankfully, there's articles like <a href="http://www.phpbuilder.com/columns/ian_gilfillan20060412.php3">this one</a> from PHPBuilder.com that can help you safeguard your site against these attacks.
</p>
<quote>
<i>
Insecure PHP scripts have provided great opportunities for spammers to abuse other's resources to send out their spam. In particular, it's the mail() function that can be abused. I myself was the target a few months ago when I noticed spam being sent from an old form on my server that I'd forgotten about. This month's article looks at techniques that can be used to harden your mail form, and reduce the chances of it being misused.
</i>
</quote>
<p>
They <a href="http://www.phpbuilder.com/columns/ian_gilfillan20060412.php3">set up the simple example script</a> and show you how to exploit it to follow the wishes of potential spammers. They offer a few suggestions on hardening the form - filtering for a correct email address, checking for "bad strings" in the contents of the form, and looking for a REQUEST_METHOD value in the $_SERVER array. The methods aren't fool-proof, but they can help to dramatically reduce your chances of being the source of a lot of people's annoyance.
</p>]]></description>
      <pubDate>Wed, 12 Apr 2006 15:47:45 -0500</pubDate>
    </item>
  </channel>
</rss>
