<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: Logging in users via Zend_Auth without Sessions in PHP / Zend Framework</title>
	<atom:link href="http://marcuswelz.com/2009/01/03/logging-in-users-via-zend_auth-without-sessions-in-php-zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://marcuswelz.com/2009/01/03/logging-in-users-via-zend_auth-without-sessions-in-php-zend-framework/</link>
	<description>working hard at avoiding to write code</description>
	<lastBuildDate>Wed, 28 Jul 2010 15:33:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: marcus</title>
		<link>http://marcuswelz.com/2009/01/03/logging-in-users-via-zend_auth-without-sessions-in-php-zend-framework/comment-page-1/#comment-1439</link>
		<dc:creator>marcus</dc:creator>
		<pubDate>Wed, 06 May 2009 00:06:13 +0000</pubDate>
		<guid isPermaLink="false">http://metaversedeveloper.com/?p=274#comment-1439</guid>
		<description>Thanks for pointing that out, Cliff, I appreciate it. I&#039;ve updated the code.

As one might imagine, the base64 encoding was an untested last-minute change that I am not using in my production code because of the overhead.

Keeping the identity (say, just a username) in clear text also allows for some neat features, such as the ability to read it out via Javascript and update otherwise static HTML with a seemingly dynamic header. I&#039;ll save that for another post.</description>
		<content:encoded><![CDATA[<p>Thanks for pointing that out, Cliff, I appreciate it. I've updated the code.</p>
<p>As one might imagine, the base64 encoding was an untested last-minute change that I am not using in my production code because of the overhead.</p>
<p>Keeping the identity (say, just a username) in clear text also allows for some neat features, such as the ability to read it out via Javascript and update otherwise static HTML with a seemingly dynamic header. I'll save that for another post.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cliff</title>
		<link>http://marcuswelz.com/2009/01/03/logging-in-users-via-zend_auth-without-sessions-in-php-zend-framework/comment-page-1/#comment-1224</link>
		<dc:creator>Cliff</dc:creator>
		<pubDate>Tue, 28 Apr 2009 12:31:03 +0000</pubDate>
		<guid isPermaLink="false">http://metaversedeveloper.com/?p=274#comment-1224</guid>
		<description>Just a heads up.

In line 189 (writing the cookie): you base64_encode() the $contents _after_ you&#039;ve created the MD5 hash.

In line 166 (reading the cookie): you don&#039;t base64_decode() the $contents before performing the MD5 to compare against the checksum held in the cookie.

Line 166-167 should be:
if (md5(base64_decode($contents) . $now . $this-&gt;_secret) == $checksum) {
    $this-&gt;_cached = $contents;
}

~ Cliff</description>
		<content:encoded><![CDATA[<p>Just a heads up.</p>
<p>In line 189 (writing the cookie): you base64_encode() the $contents _after_ you've created the MD5 hash.</p>
<p>In line 166 (reading the cookie): you don't base64_decode() the $contents before performing the MD5 to compare against the checksum held in the cookie.</p>
<p>Line 166-167 should be:<br />
if (md5(base64_decode($contents) . $now . $this-&gt;_secret) == $checksum) {<br />
    $this-&gt;_cached = $contents;<br />
}</p>
<p>~ Cliff</p>
]]></content:encoded>
	</item>
</channel>
</rss>
