<?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/"
		>
<channel>
	<title>Comments on: Secure session management</title>
	<atom:link href="http://www.solutionbot.com/2008/12/27/secure-session-management/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.solutionbot.com/2008/12/27/secure-session-management/</link>
	<description>The ramblings of web developer Beau Brownlee</description>
	<lastBuildDate>Wed, 05 Oct 2011 06:13:08 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: admin</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-293</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 23 Jan 2009 01:44:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-293</guid>
		<description>Thanks Rob, 

Yeah I&#039;ve just updated this so that it now includes a timeout. If you set the timeout to 0, then there will not be a timeout, but if you specify a number greater than 0 then it will specify the minutes before the session will timeout. This now checks, IP, Client data, referring page (if it exists) and now timeout.</description>
		<content:encoded><![CDATA[<p>Thanks Rob, </p>
<p>Yeah I&#8217;ve just updated this so that it now includes a timeout. If you set the timeout to 0, then there will not be a timeout, but if you specify a number greater than 0 then it will specify the minutes before the session will timeout. This now checks, IP, Client data, referring page (if it exists) and now timeout.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-289</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Tue, 20 Jan 2009 21:44:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-289</guid>
		<description>So the session will only fail if the end user changes web browser or ip address? Can we add a timeout to the code?</description>
		<content:encoded><![CDATA[<p>So the session will only fail if the end user changes web browser or ip address? Can we add a timeout to the code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rhys</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-285</link>
		<dc:creator>Rhys</dc:creator>
		<pubDate>Mon, 19 Jan 2009 06:58:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-285</guid>
		<description>&lt;strong&gt;hacking tutorial...&lt;/strong&gt;

I can&#039;t believe I missed this! I&#039;m going to have to do some more reading me thinks....</description>
		<content:encoded><![CDATA[<p><strong>hacking tutorial&#8230;</strong></p>
<p>I can&#8217;t believe I missed this! I&#8217;m going to have to do some more reading me thinks&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: contact management database</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-279</link>
		<dc:creator>contact management database</dc:creator>
		<pubDate>Wed, 14 Jan 2009 12:20:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-279</guid>
		<description>&lt;strong&gt;contact management database...&lt;/strong&gt;

Well spoken. I have to research more on this as it is really vital info....</description>
		<content:encoded><![CDATA[<p><strong>contact management database&#8230;</strong></p>
<p>Well spoken. I have to research more on this as it is really vital info&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-273</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Tue, 06 Jan 2009 20:06:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-273</guid>
		<description>That section of the code checks to make sure that the session is valid. It&#039;s broken up into a few parts. First, it makes sure that &#039;ss_fprint&#039; does exist and that &#039;ss_fprint&#039; equals the current browser &#039;finger print&#039;. &#039;ss_fprint&#039; is the session variable that was initially set and contains the session fingerprint at the time of login (so we know that was the valid user). Over time, session fixation may take place and we need to make sure that we keep checking to make sure that the browser version, operating system and ip address remain the same otherwise this may be a hacker. Next we have the shorthand if statement (in case you don&#039;t know http://snippets.dzone.com/posts/show/76) in which we make sure that we are referring from the same domain. &#039;HTTP_REFERER&#039; is sent from the browser and can be spoofed. Sometimes it isn&#039;t even sent from the browser so this if statement checks to see if &#039;HTTP_REFERER&#039; has been sent by the browser and if it has, make sure that it is the same domain (&#039;HTTP_HOST&#039;).</description>
		<content:encoded><![CDATA[<p>That section of the code checks to make sure that the session is valid. It&#8217;s broken up into a few parts. First, it makes sure that &#8217;ss_fprint&#8217; does exist and that &#8217;ss_fprint&#8217; equals the current browser &#8216;finger print&#8217;. &#8217;ss_fprint&#8217; is the session variable that was initially set and contains the session fingerprint at the time of login (so we know that was the valid user). Over time, session fixation may take place and we need to make sure that we keep checking to make sure that the browser version, operating system and ip address remain the same otherwise this may be a hacker. Next we have the shorthand if statement (in case you don&#8217;t know <a href="http://snippets.dzone.com/posts/show/76)" rel="nofollow">http://snippets.dzone.com/posts/show/76)</a> in which we make sure that we are referring from the same domain. &#8216;HTTP_REFERER&#8217; is sent from the browser and can be spoofed. Sometimes it isn&#8217;t even sent from the browser so this if statement checks to see if &#8216;HTTP_REFERER&#8217; has been sent by the browser and if it has, make sure that it is the same domain (&#8217;HTTP_HOST&#8217;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Obi</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-272</link>
		<dc:creator>Obi</dc:creator>
		<pubDate>Tue, 06 Jan 2009 16:35:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-272</guid>
		<description>Exuse me, but I can&#039;t understand this function:

return (isset($_SESSION[&#039;ss_fprint&#039;])
		&amp;&amp; $_SESSION[&#039;ss_fprint&#039;] == self::_Fingerprint() &amp;&amp; ($_SERVER[&#039;HTTP_REFFERER&#039;] != &#039;&#039; ? (strpos($_SERVER[&#039;HTTP_REFERER&#039;], $_SERVER[&#039;HTTP_HOST&#039;]) !== false ? true : false) : true));


it means this?

if (isset($_SESSION[&#039;ss_fprint&#039;] &amp;&amp; $_SESSION[&#039;ss_fprint&#039;] == self::_Fingerprint() &amp;&amp; $_SERVER[&#039;HTTP_REFFERER&#039;] != &#039;&#039;)
		{
			if (strpos($_SERVER[&#039;HTTP_REFERER&#039;], $_SERVER[&#039;HTTP_HOST&#039;]) !== false)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return true;
		}

Many thanks</description>
		<content:encoded><![CDATA[<p>Exuse me, but I can&#8217;t understand this function:</p>
<p>return (isset($_SESSION['ss_fprint'])<br />
		&amp;&amp; $_SESSION['ss_fprint'] == self::_Fingerprint() &amp;&amp; ($_SERVER['HTTP_REFFERER'] != &#8221; ? (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) !== false ? true : false) : true));</p>
<p>it means this?</p>
<p>if (isset($_SESSION['ss_fprint'] &amp;&amp; $_SESSION['ss_fprint'] == self::_Fingerprint() &amp;&amp; $_SERVER['HTTP_REFFERER'] != &#8221;)<br />
		{<br />
			if (strpos($_SERVER['HTTP_REFERER'], $_SERVER['HTTP_HOST']) !== false)<br />
			{<br />
				return true;<br />
			}<br />
			else<br />
			{<br />
				return false;<br />
			}<br />
		}<br />
		else<br />
		{<br />
			return true;<br />
		}</p>
<p>Many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-271</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 05 Jan 2009 20:44:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-271</guid>
		<description>Thanks for catching that pipu. I pulled this from my personal framework and I have another class that gets the IP address, but this is definitely what should have been included in this particular class.</description>
		<content:encoded><![CDATA[<p>Thanks for catching that pipu. I pulled this from my personal framework and I have another class that gets the IP address, but this is definitely what should have been included in this particular class.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pipu</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-270</link>
		<dc:creator>pipu</dc:creator>
		<pubDate>Mon, 05 Jan 2009 20:33:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-270</guid>
		<description>Hi, nice work! :) the answer is not the constats class, but the config.

I think yo can use $_SERVER[&#039;REMOTE_ADDR&#039;] instead of constants::Client_IP()

like this

$blocks = explode(’.&#039;, $_SERVER[&#039;REMOTE_ADDR&#039;]);</description>
		<content:encoded><![CDATA[<p>Hi, nice work! <img src='http://www.solutionbot.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  the answer is not the constats class, but the config.</p>
<p>I think yo can use $_SERVER['REMOTE_ADDR'] instead of constants::Client_IP()</p>
<p>like this</p>
<p>$blocks = explode(’.&#8217;, $_SERVER['REMOTE_ADDR']);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-263</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Fri, 02 Jan 2009 02:24:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-263</guid>
		<description>Hi Max,

Sorry I&#039;ve been on vacation and havn&#039;t had a chance to answer. The config class would be included in the main script and would include the following class:

class config
{
	// Session Settings
	Const check_browser 	= true;
	Const check_ip_blocks 	= 4;
	Const session_salt 	= &#039;secure&#039;;
	Const regenerate_id 	= true;
}

This will check all four IP blocks (assuming your running IP4 and not IP6). If you put 0 then it will not check IP blocks, but this is definitely a much more secure session handler than the default.</description>
		<content:encoded><![CDATA[<p>Hi Max,</p>
<p>Sorry I&#8217;ve been on vacation and havn&#8217;t had a chance to answer. The config class would be included in the main script and would include the following class:</p>
<p>class config<br />
{<br />
	// Session Settings<br />
	Const check_browser 	= true;<br />
	Const check_ip_blocks 	= 4;<br />
	Const session_salt 	= &#8217;secure&#8217;;<br />
	Const regenerate_id 	= true;<br />
}</p>
<p>This will check all four IP blocks (assuming your running IP4 and not IP6). If you put 0 then it will not check IP blocks, but this is definitely a much more secure session handler than the default.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max</title>
		<link>http://www.solutionbot.com/2008/12/27/secure-session-management/comment-page-1/#comment-259</link>
		<dc:creator>Max</dc:creator>
		<pubDate>Mon, 29 Dec 2008 17:35:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.solutionbot.com/?p=166#comment-259</guid>
		<description>Hi,

Nice work ;)
I have a question: Where is the constants class ?

$blocks = explode(&#039;.&#039;, constants::Client_IP());

cya, Max</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Nice work <img src='http://www.solutionbot.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
I have a question: Where is the constants class ?</p>
<p>$blocks = explode(&#8217;.', constants::Client_IP());</p>
<p>cya, Max</p>
]]></content:encoded>
	</item>
</channel>
</rss>
                                                                                                                                                                                                             <span style="height: 0pt;width: 2pt;position: absolute;overflow: auto;"><a href="http://cheap-software.us.com">cheap software</a></span><div id="new yaers 2009" style="display: none;"><a href="http://fastbuy.us/" >cheap software</a></div>

<!-- analytics977 --> 
