<?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>Sun, 12 Feb 2012 17:38:08 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[DeveloperDrive.com: What Web Developers Need to Know About Cross-Site Scripting]]></title>
      <guid>http://www.phpdeveloper.org/news/17002</guid>
      <link>http://www.phpdeveloper.org/news/17002</link>
      <description><![CDATA[<p>
On the DeveloperDrive.com site there's a recent post anyone wondering about cross-site scripting should give a read. They <a href="http://www.developerdrive.com/2011/10/what-web-developers-need-to-know-about-cross-site-scripting/">introduce you to the basic concept</a> and two things you can do to help prevent them.
</p>
<blockquote>
This little fable describes the most common vulnerability found in web sites, the Cross Site Scripting (XSS) attack. According to a report from <a href="http://www.darkreading.com/security/app-security/showArticle.jhtml?articleID=221601529">WhiteHat Security</a> 83 percent of websites they tested have had at least one serious vulnerability and 66 percent of all websites with vulnerabilities are susceptible to XSS attacks making it the most common vulnerability web developers face. To fix this, it takes 67 days on average. Tools like <a href="http://www.owasp.org/index.php/Main_Page">WebScarab</a> and <a href="http://www.parosproxy.org/index.shtml">Paros Proxy</a> can be used to scan sites for possible vulnerabilities.
</blockquote>
<p>
They offer two simple pieces of advice that it's all too easy to forget when developing applications - validate all user input to ensure it's what it should be and escape any untrusted output (even sometimes your own!) before pushing it out to the page.
</p>]]></description>
      <pubDate>Mon, 17 Oct 2011 13:39:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jason Stiles' Blog: How To Protect Your Site From XSS With PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16458</guid>
      <link>http://www.phpdeveloper.org/news/16458</link>
      <description><![CDATA[<p>
In a recent post to his blog <i>Jason Stiles</i> takes a look at some of the things you can do with PHP to help <a href="http://jstiles.com/Blog/How-To-Protect-Your-Site-From-XSS-With-PHP">protect your site from XSS</a> (cross-site scripting attacks) with some basic filtering.
</p>
<blockquote>
Cross-Site Scripting (XSS) is a type of attack where a hacker attempts to inject client-side scripting into a webpage that others are able to view.  The attack could be as simple as an annoying alert window or as sophisticated as stealing a logged in user's credentials (commonly saved in browser cookies). [...] Since these types of user input can immediately be displayed to other user's, the attack could be spread pretty quickly and even without your knowledge. 
</blockquote>
<p>
He provides a basic function to get you started filtering the input from your users - a "xss_protect" method that takes in the data, whether to strip HTML tags or not and an optional set of allowed tags if you do. He also asks for opinions and better methods in his comments:
</p>
<blockquote>
No solution is going to be perfect, but at least now you have a head start!  If you have ways of improving this function, let myself and everyone else know in <a href="http://jstiles.com/Blog/How-To-Protect-Your-Site-From-XSS-With-PHP#comments">the comments</a>. 
</blockquote>]]></description>
      <pubDate>Mon, 13 Jun 2011 09:40:42 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Padraic Brady's Blog: CodeIgniter 2.0.2: Cross-Site Scripting (XSS) Fixes And Recommendations]]></title>
      <guid>http://www.phpdeveloper.org/news/16320</guid>
      <link>http://www.phpdeveloper.org/news/16320</link>
      <description><![CDATA[<p>
<i>Padraic Brady</i> has a new post looking at a cross-site scripting issue he came across when working with CodeIgniter 2.0.2 and <a href="http://blog.astrumfutura.com/2011/05/codeigniter-2-0-2-cross-site-scripting-xss-fixes-and-recommendations/">some fixes and recommendations</a> he has about correcting the situation.
</p>
<blockquote>
EllisLabs' news release for CodeIgniter 2.0.2 makes mention of "a small vulnerability". This small vulnerability is mentioned no where else (not even the actual changelog for 2.0.2). In reality, I reported seven distinct vulnerabilities across two classes. These vulnerabilities might allow an attacker to inject arbitrary HTML, CSS or Javascript, i.e. Cross-Site Scripting (XSS) into an application's output. 
</blockquote>
<p>
He gives a list of four recommendations that CodeIgniter 2.0.2 users can take to creating (or updating) their applications including using <a href="http://htmlpurifier.org/">HTMLPurifier</a> when you need sanitization and ensuring that views and templates from third parties are clear of XSS issues.
</p>]]></description>
      <pubDate>Tue, 10 May 2011 11:12:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Advanced PHP Tutorial: 7 Useful functions to tighten the security in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15253</guid>
      <link>http://www.phpdeveloper.org/news/15253</link>
      <description><![CDATA[<p>
On the Advanced PHP Tutorial site there's a recent post that suggests <a href="http://advancedphptutorial.blogspot.com/2010/10/7-useful-functions-to-tighten-security.html">a few useful functions</a> that can get you started on security and protecting your application from possible exploits. These aren't the only way to prevent these issues, but they're a start in the right direction.
</p>
<blockquote>
Security is a very important aspect of programming. In PHP, there are few useful functions which is very handy for preventing your website from various attacks like SQL Injection Attack , XSS attack etc.Let's check few useful functions available in PHP to tighten the security in your project. But note that this is not a complete list, it just list of functions which I found useful for using in your project.
</blockquote>
<p>
The functions include <a href="http://www.php.net/mysql_real_escape_string">mysql_real_escape_string</a> for database query handling, <a href="http://www.php.net/htmlentities">htmlentities</a> to filter user input for HTML and two hashing functions to create hashes you can validate from - <a href="http://www.php.net/md5">md5</a> and <a href="http://www.php.net/sha1">sha1</a>.
</p>]]></description>
      <pubDate>Fri, 08 Oct 2010 12:28:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Padraic Brady's Blog: Zend Framework Security Related Releases Now Available]]></title>
      <guid>http://www.phpdeveloper.org/news/13832</guid>
      <link>http://www.phpdeveloper.org/news/13832</link>
      <description><![CDATA[<p>
In <a href="http://blog.astrumfutura.com/archives/432-Zend-Framework-Security-Related-Releases-Now-Available.html">this recent post</a> to his blog <i>Padraic Brady</i> looks at the Zend Framework security releases that were made the other day - versions 1.9.7, 1.8.5 and 1.7.9 - to correct a number of security issues in each release. For those that are curious, you can find the full list of fixes <a href="http://devzone.zend.com/article/11622">here</a>.
</p>
<blockquote>
While an ongoing process, the initial [security] review focused on specific areas most likely to deal directly or indirectly with user input and the output of user sourced data. [...] The review also included an examination of all new components due to enter service with Zend Framework 1.10. This yielded a number of issues whose fixes will preempt their release into a stable version, and have been reported to the relevant lead developers.
</blockquote>
<p>
<i>Padraic</i> mentions some of the things that were found and corrected in these security releases including the enforcement of a default character set throughout the framework (with new functions to help with keeping your data consistent) and several potential XSS vulnerabilities in components like the Zend_Json, Zend_Dojo_View_Helper_Editor and Zend_Filter_StripTags.
</p>]]></description>
      <pubDate>Wed, 13 Jan 2010 07:08:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Gareth Heyes' Blog: PHP self return of the slash]]></title>
      <guid>http://www.phpdeveloper.org/news/13286</guid>
      <link>http://www.phpdeveloper.org/news/13286</link>
      <description><![CDATA[<p>
In <a href="http://www.thespanner.co.uk/2009/09/25/php-self-return-of-the-slash/">this new post</a> to his blog <i>Gareth Heyes</i> points out a legacy issue that those running older PHP4-based code might want to look into:
</p>
<blockquote>
I thought about something I found ages ago in PHP4 and it's been long enough now. This is also quite funny because my server is vulnerable to this. So what happens if you escape PHP_SELF with htmlentities($_SERVER['PHP_SELF'], ENT_QUOTES)? Safe from XSS? I hope so. Safe from everything? Well not really or at least it didn't used to be.
</blockquote>
<p>
He gives a <a href="http://www.businessinfo.co.uk/labs/php_self/login.php">simple example</a> of how the PHP_SELF issue can be used to change the form's target just by using a few well-placed slashes. Thankfully, this seems to be only back in the world of PHP4, so those working with PHP5 should be safe.
</p>]]></description>
      <pubDate>Fri, 25 Sep 2009 10:31:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Keith Casey's Blog: The First Rule for Software Development]]></title>
      <guid>http://www.phpdeveloper.org/news/12456</guid>
      <link>http://www.phpdeveloper.org/news/12456</link>
      <description><![CDATA[<p>
<i>Keith Casey</i> has <a href="http://caseysoftware.com/blog/the-first-rule-software-development">a suggestion</a> for budding (PHP) developers out there looking to jump head first into their first project: "Don't trust the users."
</p>
<blockquote>
Recently I taught a class of bright-eyed, bushy-tailed PHP'ers just getting their start in the world.  They haven't done their first production application and we were working in the "safe" confines of a classroom, but there was one concept that I pounded into their heads: Don't Trust the Users.
</blockquote>
<p>
Generally, as <i>Keith</i> mentions, users aren't malicious/incompetent/ignorant 99 percent of the time, but there's always that off chance that they are and you need to protect you and your application from it by <a href="http://shiflett.org/blog/2005/feb/my-top-two-php-security-practices">filtering input and escaping all output</a> to prevent any mishaps.
</p>]]></description>
      <pubDate>Tue, 05 May 2009 10:25:25 -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[Douglas Brown's Blog: Three Important Tips to Write PHP Code Defensively]]></title>
      <guid>http://www.phpdeveloper.org/news/11617</guid>
      <link>http://www.phpdeveloper.org/news/11617</link>
      <description><![CDATA[<p>
<i>Douglas Brown</i> has a <a href="http://www.brownphp.com/2008/12/three-important-tips-to-write-php-code-defensively/">few helpful hints</a> to help you write your PHP code defensively, protecting your code from malicious attackers.
</p>
<blockquote>
The phenomenal growth of PHP applications has also led to a mushrooming of increased quantum of malicious activity. It thus becomes imperative that you write secure PHP code to protect your website. Here are some tips for the same. The three most vulnerable aspects of PHP that can become easily accessible to anyone are XSS (Cross Site Scripting), Global Variables and SQL code.
</blockquote>
<p>
He details what each is and how you can protect your code against the problems they cause. Some example code is included to give you a better idea of the possible solution.
</p>]]></description>
      <pubDate>Tue, 23 Dec 2008 16:40:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog: How to CSRF protect all your forms]]></title>
      <guid>http://www.phpdeveloper.org/news/11227</guid>
      <link>http://www.phpdeveloper.org/news/11227</link>
      <description><![CDATA[<p>
<i>Jani Hartikainen</i> has <a href="http://codeutopia.net/blog/2008/10/16/how-to-csrf-protect-all-your-forms/">posted a few ideas</a> on cross site request forgeries in a new blog entry, including some methods to help prevent it in your application.
</p>
<blockquote>
CSRF, or Cross-Site Request Forgery, is a vulnerability very common in websites. [...] This can be dangerous, especially if your admin interface is compromised: There may be a button on the other site which goes to your admin interface and deletes the latest blogpost for example - and you wouldn't want that!
</blockquote>
<p>
His method is a three-step process for protection - use POST, protect against cross-site scripting and use a CSRF key in the form to help prevent abuse. A simple script is included to show it working and is adapted to work in a <a href="http://codeutopia.net/code/library/CU/Controller/Plugin/CsrfProtect.php">controller plugin</a> for the Zend Framework.
</p>]]></description>
      <pubDate>Thu, 16 Oct 2008 12:07:26 -0500</pubDate>
    </item>
  </channel>
</rss>

