<?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, 06 Sep 2008 22:43:06 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Dokeos Blog: mbstring vs iconv]]></title>
      <guid>http://www.phpdeveloper.org/news/10034</guid>
      <link>http://www.phpdeveloper.org/news/10034</link>
      <description><![CDATA[<p>
In <a href="http://dokeoslead.wordpress.com/2008/04/22/mbstring-vs-iconv/">this post</a> on the Dokeos blog, there's a comparison of the <a href="http://www.php.net/mbstring">mbstring</a> function and the <a href="http://php.net/iconv">iconv</a> library as it pertains to their use on multi-byte strings.
</p>
<blockquote>
I was wondering today why use mbstring rather than iconv in Dokeos, and honestly I didn't remember exactly why I had chosen mbstring in the past, but finding information about the *differences* between the two. [...] Searching a bit more, I found a <a href="http://www.nyphp.org/content/presentations/smallworld/April2006-nyphp-Presentation.ppt">PPT presentation</a> from Carlos Hoyos on Google.
</blockquote>
<p>
Essentially, it boils down to how the library is integrated - mbstring is bundled and iconv is pulled from an external source. So, if you're looking for maximum portability, he recommends mbstring.
</p>]]></description>
      <pubDate>Thu, 24 Apr 2008 11:18:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Hasin Hayder's Blog: Did you know 'you can have cheese burger' could be a variable name?]]></title>
      <guid>http://www.phpdeveloper.org/news/8895</guid>
      <link>http://www.phpdeveloper.org/news/8895</link>
      <description><![CDATA[<p>
<i>Hasin Hayder</i> has a <a href="http://hasin.wordpress.com/2007/10/20/did-you-know-you-can-have-cheese-burger-could-be-a-variable-name/">quick tip</a> for users of SimpleXML - a handy way to access a node in an XML document that has unsupported characters in its name.
</p>
<blockquote>
I was finding a way to refer that element as a SimpleXMLElement and found a nifty note in PHP Manual. It says if you have unsupported (unsupported in PHP Lexicon for a variable name) characters inside the name of a node, you can access it using a special pattern {'name'}.
</blockquote>
<p>
In <a href="http://hasin.wordpress.com/2007/10/20/did-you-know-you-can-have-cheese-burger-could-be-a-variable-name/">his example</a>, he shows how a popular phrase ("i can have cheese burger") can be used as the variable name despite having spaces in it.
</p>]]></description>
      <pubDate>Wed, 24 Oct 2007 08:57:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Shiflett's Blog: Character Encoding and XSS]]></title>
      <guid>http://www.phpdeveloper.org/news/8084</guid>
      <link>http://www.phpdeveloper.org/news/8084</link>
      <description><![CDATA[<p>
In <a href="http://shiflett.org/blog/2007/may/character-encoding-and-xss">this post</a> to his blog, <i>Chris Shiflett</i> talks about some issues surrounding character encoding and the cross-site scripting issues it can open up in your application.
</p>
<blockquote>
<p>
In the post [on Good and Bad PHP Code], he provides a few useful PHP interview questions, including <a href="http://blog.assembleron.com/2007/05/23/php-interview-questions-from-yahoo/">some questions from Yahoo</a>. He explains that good PHP code should be Structured, Consistent, Portable and Secure
</p>
<p>
In the comments, many additional improvements have been suggested, but there's one that has yet to be mentioned. When using htmlspecialchars() without specifying the character encoding, <a href="http://shiflett.org/blog/2005/dec/google-xss-example">XSS attacks that use UTF-7</a> are possible.
</p>
</blockquote>
<p>
Included in <a href="http://shiflett.org/blog/2007/may/character-encoding-and-xss">the post</a> is an example to illustrate the point as well as a solution, a simple one involving the header() function, to help correct the problem and prevent bad things from happening.
</p>
<p>
Be sure to check out <a href="
</p>http://shiflett.org/blog/2007/may/character-encoding-and-xss#comments">the comments</a> for more great tips.]]></description>
      <pubDate>Wed, 20 Jun 2007 09:35:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Esser's Blog: What site do you want to break today?]]></title>
      <guid>http://www.phpdeveloper.org/news/8063</guid>
      <link>http://www.phpdeveloper.org/news/8063</link>
      <description><![CDATA[<p>
In a <a href="http://blog.php-security.org/archives/87-What-site-do-you-want-to-break-today.html">new post</a> to the PHP Security Blog, <i>Stefan Esser</i> points out <a href="http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.35&r2=1.417.2.8.2.36">a recent commit</a> to the PHP core as a fix to the session handling in PHP:
</p>
<blockquote>
I just came back home and saw a very recent commit to PHP's session management. It is another attempt to fix the session cookie attribute injection that the PHP developers already tried to fix in PHP 5.2.3 without giving any credits. [...] their new fix that consists of blacklisting a bunch of legal characters from the session id, will most probably result in hundreds or thousands of broken sites.
</blockquote>
<p>
<i>Stefan</i> points out that the fix blocks several valid characters that sites could potentially use in their session IDs, and that with this new code in place, it could drastically effect those site's functionality.
</p>
<p>
As of the time of this post, however, it seems that the issue has been <a href="http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.36&r2=1.417.2.8.2.37">recognized and corrected</a> so as not to cause the above mentioned issue in future updates.
</p>]]></description>
      <pubDate>Mon, 18 Jun 2007 08:48:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Hot PHP UTF-8 tips]]></title>
      <guid>http://www.phpdeveloper.org/news/6005</guid>
      <link>http://www.phpdeveloper.org/news/6005</link>
      <description><![CDATA[<p>
Following up on some of his previous posts to the SitePoint PHP Blog, <i>Harry Fuecks</i> has posted <a href="http://www.sitepoint.com/blogs/2006/08/10/hot-php-utf-8-tips/">this quick guide</a> with some "hot UTF-8 tips" to share with the community.
</p>
<blockquote>
As a result of all the <a href="http://www.sitepoint.com/blogs/2006/08/09/scripters-utf-8-survival-guide-slides/">noise about UTF-8</a>, got an email from Marek Gayer with some very smart tips on handling UTF-8. What follows is a discussion illustrating what happens when you get obsessed with performance and optimizations (be warned - may be boring, depending on your perspective).
</blockquote>
<p>
He <a href="http://www.sitepoint.com/blogs/2006/08/10/hot-php-utf-8-tips/">talks mainly</a> about using the native PHP functionality to avoid the mbstring issues that could arise by restricting locale behavior and using a fast case conversion function to handle strings correctly. The other tip involves delivery methods to those not able to recieve UTF-8 formatted content - checking their character set and responding accordingly.
</p>]]></description>
      <pubDate>Thu, 10 Aug 2006 14:50:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Shiflett's Blog: Google XSS and Evil Character Encoding]]></title>
      <guid>http://www.phpdeveloper.org/news/4540</guid>
      <link>http://www.phpdeveloper.org/news/4540</link>
      <description><![CDATA[On his blog today, <i>Chris Shiflett</i> has two posts about a problem with Google and a Cross-site Scripting attack that it's vulnerable to.
<p>
From <a href="http://shiflett.org/archive/177">this post</a>:
<quote>
<i>
The recent cross-site scripting (XSS) vulnerability discovered in Google perfectly illustrates why character encoding matters. <a href="http://phpsecurity.org/code/ch01-4">This example</a> demonstrates how to use PHP's htmlentities() with the optional third argument that indicates the character encoding.
</i>
</quote>
<p>
By way of demonstration, he provides a little PHP script that makes a request in a different character encoding than Google can handle. Coupled with the small response from Google, a UTF-7 character sent to certain browsers could be interpreted and executed.
<p>
In <a href="http://shiflett.org/archive/178">this second post</a>, he answers a question from the comments - "how will this effect my site?"
<p>
<quote>
<i>
Rather than offer another vague answer, I decided to provide a very simple proof of concept that demonstrates how character encoding inconsistencies can bite you. Google's vulnerability has of course been fixed, but with a simple PHP script, we can reproduce the situation.
</i>
</quote>
<p>
<a href="http://shiflett.org/archive/178">The script</a>, though escaped, still causes a Javascript popup box to show when the page is loaded - all due to a lack of improper character encoding handling...]]></description>
      <pubDate>Thu, 22 Dec 2005 06:19:39 -0600</pubDate>
    </item>
  </channel>
</rss>
