<?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:44:57 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Evert Pot's Blog: Creating Streams from Strings in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/11859</guid>
      <link>http://www.phpdeveloper.org/news/11859</link>
      <description><![CDATA[<p>
<i>Evert Pot</i> has a <a href="http://www.rooftopsolutions.nl/article/222">quick post</a> on a handy little topic - making streams from strings with PHP (see some of it in action on <a href="http://www.phpdeveloper.org/news/11857">Davey Shafik's blog</a>).
</p>
<blockquote>
There are situations where a string instead needs to be used, and for these purposes the data: stream wrapper is used. Initially I thought it was only possible to encode the actual string in base64, which I didn't like because of the added footprint. [...] Quickly checking out the rfc, it turns out that ';base64' can be omitted to just pass along the raw data, which makes a lot more sense in the context of PHP.
</blockquote>
<p>
His example takes in an example string and pushes it back out the other side after base64 encoding and decoding it. <i>Davey Shafik</i> <a href="http://www.phpdeveloper.org/news/11857">found a use</a> for it in avoiding an <a href="http://php.net/eval">eval</a> call.
</p>]]></description>
      <pubDate>Mon, 02 Feb 2009 12:58:50 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Davey Shafik's Blog: Avoiding EVAL()]]></title>
      <guid>http://www.phpdeveloper.org/news/11857</guid>
      <link>http://www.phpdeveloper.org/news/11857</link>
      <description><![CDATA[<p>
<i>Davey Shafik</i> has a <a href="http://pixelated-dreams.com/archives/232-avoiding-eval.html">helpful hint</a> for avoiding one of the worst functions to use in PHP - <a href="http://php.net/eval">eval</a>.
</p>
<blockquote>
There are a shed-load of ways to "eval()" code without actually calling the eval() function '" usually done simply to avoid the use of the dreaded "evil()" function, but often times because the system has eval() disabled using "disable_functions" in php.ini. Here is another simple way to avoid eval() without writing out files to the filesystem
</blockquote>
<p>
His example uses the streams wrapper to natively execute the code from a string variable as a data element, base64 decoded. It's more of a proof-of-concept than anything else, but its an interesting solution to a tough problem to solve at times.
</p>]]></description>
      <pubDate>Mon, 02 Feb 2009 11:15:24 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP Discovery Blog: Dangers of Remote Execution]]></title>
      <guid>http://www.phpdeveloper.org/news/9092</guid>
      <link>http://www.phpdeveloper.org/news/9092</link>
      <description><![CDATA[<p>
On the PHP Discovery blog, there's a <a href="http://phpdiscovery.com/dangers-of-remote-execution/">new post</a> reminding PHP developers of some of the more dangerous ways that remote execution could effect your site and some of the common entry points it can have.
</p>
<blockquote>
PHP has numerous ways to execute raw PHP code unless you the programmer stops it.  Best way in preventing these methods is making sure you check the input of what your users are inputting, and making sure you escape all malicious actions that a hacker,cracker, kiddy scripter might want to do to your website. 
</blockquote>
<p>
He summarizes four of the things from the <a href="http://apress.com/book/view/1590595084">Pro PHP Security</a> book from Apress (by <i>Chris Snyder</i> and <i>Michael Southwell</i>) that can leave holes in you application for would-be explots - preg_replace, shell_exec/exec, eval (which we all know is only one letter from "evil" anyway) and require/include.
</p>]]></description>
      <pubDate>Wed, 21 Nov 2007 13:48:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Sara Golemon's Blog: create_function() is not your friend]]></title>
      <guid>http://www.phpdeveloper.org/news/7880</guid>
      <link>http://www.phpdeveloper.org/news/7880</link>
      <description><![CDATA[<p>
In response to <a href="http://www.phpdeveloper.org/news/7874">this previous post</a> from <i>Felix Geisendorfer</i>, <i>Sara Golemon</i> <a href="http://blog.libssh2.org/index.php?/archives/60-create_function-is-not-your-friend.html">shares a few thoughts</a> on why she thinks it's just the other way around - create_function is not your friend.
</p>
<p>
In the <a href="http://blog.libssh2.org/index.php?/archives/60-create_function-is-not-your-friend.html">short post</a> she lists just a few of the issues surrounding the use of the function including that it:
<ul>
<li>is prone to critical abuse by user-supplied code
<li>skips opcode cache optimizations
<li>encourages not using comments (evil)
<li>100% blind to reflection or PHPDoc style documentation generation
</ul>
</p>]]></description>
      <pubDate>Mon, 21 May 2007 09:31:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Security Tips #10, #11, and #12]]></title>
      <guid>http://www.phpdeveloper.org/news/7454</guid>
      <link>http://www.phpdeveloper.org/news/7454</link>
      <description><![CDATA[<p>
The Zend Developer Zone has posted three new helpful security tips to add to their <a href="http://devzone.zend.com/public/view/tag/Security_Tips">growing list</a> - one on mailing, one about working with privileges, and the other on the dangers of eval:
<ul>
<li>In <a href="http://devzone.zend.com/node/view/id/1815">tip #10</a>, <i>Cal</i> looks briefly at some of the dangers of blindly using form input when sending a mail. One never knows what kind of nasty headers a user might enter.
<li><a href="http://devzone.zend.com/node/view/id/1817">Tip #11</a> recommends the "path of least privileges" when it comes to allowing access to your application. Don't go global when simple will do just fine - even with the best of intentions, the wrong access can lead to big issues.
<li>Finally, in <a href="http://devzone.zend.com/node/view/id/1821">tip #12</a>, one of the more discouraged functions in PHP is discussed - eval. This one little function, when fed the wrong kind of string, can unravel your application from the inside out and provide a would-be attacker just the opening they might need.
</ul>
<p>
You can check out more great security tips like these on the <a href="http://devzone.zend.com/public/view/tag/Security_Tips">Zend Developer Zone</a> website.
</p>]]></description>
      <pubDate>Mon, 19 Mar 2007 11:24:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: My Next Foolish Project: A console for CakePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/7254</guid>
      <link>http://www.phpdeveloper.org/news/7254</link>
      <description><![CDATA[<p>
<i>Chris Hartjes</i> is <a href="http://www.littlehart.net/atthekeyboard/2007/02/09/my-next-foolish-project-a-console-for-cakephp/">taking on</a> what he calls his "next foolish project" - a console for the CakePHP framework.
</p>
<blockquote>
On the CakePHP mailing list, somebody familiar with Ruby on Rails' console functionality asked "why isn't there one of these in Cake?" [...] So I got to thinking about how to do this. On the surface, it seems the easiest way to do this is to write a PHP script that takes entries on the command line, run the input through an 'eval' statement. Sounds easy enough, and I could write that in a hurry. I think the trickiness comes in figuring out how to hook it into CakePHP so that you can access Models that already exist.
</blockquote>
<p>
For those attending the <a href="http://vancover.php.net/">Vancouver PHP Conference</a>, attend his talk and you might get  amention of how far he's come with the idea. Otherwise, stay tuned to <a href="http://www.littlehart.net/atthekeyboard/">his blog</a> for updates.
</p>]]></description>
      <pubDate>Mon, 12 Feb 2007 07:55:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: The Joy of Regular Expressions [2]]]></title>
      <guid>http://www.phpdeveloper.org/news/6375</guid>
      <link>http://www.phpdeveloper.org/news/6375</link>
      <description><![CDATA[<p>
<i>Harry Fuecks</i> is back today on the SitePoint PHP Blog with <a href="http://www.sitepoint.com/blogs/2006/09/27/the-joy-of-regular-expressions-2/">part two</a> of his "joy of regular expressions" series, continuing on from <a href="http://www.phpdeveloper.org/news/6356">this previous entry</a>.
</p>
<p>
He jumps right in, summarizing the first part in a small section before getting back into the examples:
<ul>
<li>Hunting for .jp(e)gs
<li>Escaping Meta-Characters
<li>Search and Replace
<li>preg_quote()
<li>preg_replace()
<li>Word Boundaries, Word Characters...and everything else
<li>Sub patterns
<li>Spot the XSS Hole
<li>eval() is evil!
<li>preg_replace_callback()
</ul>
As you can see, it's crammed with just as much infromation as the first part and <a href="http://www.sitepoint.com/blogs/2006/09/27/the-joy-of-regular-expressions-2/">covers a wide range of topics</a> to help you get more in tune with your inner regular expression guru.
</p>]]></description>
      <pubDate>Wed, 27 Sep 2006 09:20:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[TheDailyWTF.com: Client-Side PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5168</guid>
      <link>http://www.phpdeveloper.org/news/5168</link>
      <description><![CDATA[<p>
The Daily WTF post <a href="http://thedailywtf.com/forums/68115/ShowPost.aspx">for today </a> bears mentioning if for nothing less than to show how to not do things. It has an interesting twist on the whole Ajax craze that's going on in the web today, and takes it to a really scary, pointless level.
</p>
<quote>
<i>
<p>
The introduction of the XMLHttpRequest component (*) opened the doorway for a new breed of "fancy schmancy" web applications like Flickr, GMail, etc. This, in turn, spawned an entire sub-industry and a new series of buzzwords seemingly based on the names of household cleaning chemicals. It even incremented the current version of the Internet to 2.0.
</p>
<p>
That said, it should come as no surprise that this Borax-technology has also empowered "certain programmers" to create new perversions in information technology never imagined before. Gustavo Carvalho discovered what happens when XMLHttpRequest and the Eval() function in PHP are combined. I'll leave it to your immagination as to what the server-side looks like ... 
</p>
</i>
</quote>
<p>
You should definitely check out <a href="http://thedailywtf.com/forums/68115/ShowPost.aspx">the code</a> on this one - using evil() is bad enough, but passing code back to the PHP server like that is just wrong (and a huge security hole).
</p>]]></description>
      <pubDate>Thu, 13 Apr 2006 07:03:29 -0500</pubDate>
    </item>
  </channel>
</rss>

