<?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, 19 May 2013 19:04:24 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Paul Reinheimer's Blog: Cookies don't replace Sessions]]></title>
      <guid>http://www.phpdeveloper.org/news/17438</guid>
      <link>http://www.phpdeveloper.org/news/17438</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Paul Reinheimer</i> talks about <a href="http://blog.preinheimer.com/index.php?/archives/373-Cookies-dont-replace-Sessions.html">replacing sessions with cookies</a> and some of the (security) pitfalls that can come with it.
</p>
<blockquote>
I've seen several instances where people have demonstrated the ease with which encrypted cookies can replace sessions within PHP. Michael Nitschinger <a href="http://nitschinger.at/Session-Encryption-with-Lithium">wrote a piece</a> recently demonstrating the switch with Lithium, while CodeIgniter does this <a href="http://codeigniter.com/user_guide/libraries/sessions.html">by default</a> (optionally encrypting). The problem is that while replacing sessions with cookies works, it introduces a few risks not present with native session support, and these risks tend to be under documented.
</blockquote>
<p>
He gives an illustration of an attacker who sits between Amazon and one of their warehouses. Despite encrypting their order details, all it would take is the attacker to grab an order and copy it and resend (a "replay attack"). He's created <a href="http://betting-example.orchestra.io/">an example application</a> to illustrate the point (<a href="https://github.com/preinheimer/Betting-Example">source on github</a>). The attacker doesn't even have to know what the encrypted information contains - they only have to replicate it.
</p>]]></description>
      <pubDate>Tue, 24 Jan 2012 09:26:20 -0600</pubDate>
    </item>
  </channel>
</rss>
