<?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: How to improve PHP session security</title>
	<atom:link href="http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/</link>
	<description>A blend of programming and seo</description>
	<lastBuildDate>Wed, 17 Feb 2010 21:29:09 -0500</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dr. ROX</title>
		<link>http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/comment-page-1/#comment-3386</link>
		<dc:creator>Dr. ROX</dc:creator>
		<pubDate>Sat, 18 Jul 2009 09:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawseo.com/news/?p=843#comment-3386</guid>
		<description>There&#039;s also session fixation attack, where hacker can write his own session ID to address bar, like site.com?sid=587395. You should use session_regenerate() after session_start()</description>
		<content:encoded><![CDATA[<p>There&#8217;s also session fixation attack, where hacker can write his own session ID to address bar, like site.com?sid=587395. You should use session_regenerate() after session_start()</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Wayne State Web Communications Blog &#187; Blog Archive &#187; [Friday Links] The Swine Edition</title>
		<link>http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/comment-page-1/#comment-969</link>
		<dc:creator>Wayne State Web Communications Blog &#187; Blog Archive &#187; [Friday Links] The Swine Edition</dc:creator>
		<pubDate>Sat, 02 May 2009 00:50:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawseo.com/news/?p=843#comment-969</guid>
		<description>[...] How to improve PHP session security &#124; A blend of programming and seo [...]</description>
		<content:encoded><![CDATA[<p>[...] How to improve PHP session security | A blend of programming and seo [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ??????? &#187; [Web] ????</title>
		<link>http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/comment-page-1/#comment-672</link>
		<dc:creator>??????? &#187; [Web] ????</dc:creator>
		<pubDate>Fri, 24 Apr 2009 02:32:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawseo.com/news/?p=843#comment-672</guid>
		<description>[...] How to improve PHP session security [...]</description>
		<content:encoded><![CDATA[<p>[...] How to improve PHP session security [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert Hafner</title>
		<link>http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/comment-page-1/#comment-656</link>
		<dc:creator>Robert Hafner</dc:creator>
		<pubDate>Thu, 23 Apr 2009 17:40:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawseo.com/news/?p=843#comment-656</guid>
		<description>For reference, its not enough to just use SSL. You have to actually tell the session cookie that it needs to use SSL as well, using the &quot;session_set_cookie_params&quot; function.

This funciton takes give options- lifetime (defaults to the browser session), path (defaults to the current path, its sometimes useful to change this to &#039;/&#039;), the domain (useful if you want your session to work across subdomains), and finally the two we&#039;re interested in- secure is a boolean telling the system whether to use SSL or not, and the final argument is a boolean to see if javascript should be able to access the session cookie (this is one of the most missed security features I&#039;ve seen).

session_set_cookie_params(0, &#039;/&#039;, null, isset($_SERVER[&quot;HTTPS&quot;]), true);</description>
		<content:encoded><![CDATA[<p>For reference, its not enough to just use SSL. You have to actually tell the session cookie that it needs to use SSL as well, using the &#8220;session_set_cookie_params&#8221; function.</p>
<p>This funciton takes give options- lifetime (defaults to the browser session), path (defaults to the current path, its sometimes useful to change this to &#8216;/&#8217;), the domain (useful if you want your session to work across subdomains), and finally the two we&#8217;re interested in- secure is a boolean telling the system whether to use SSL or not, and the final argument is a boolean to see if javascript should be able to access the session cookie (this is one of the most missed security features I&#8217;ve seen).</p>
<p>session_set_cookie_params(0, &#8216;/&#8217;, null, isset($_SERVER["HTTPS"]), true);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: How to improve PHP session security &#124; A blend of programming and seo &#124; Webmaster Tools</title>
		<link>http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/comment-page-1/#comment-652</link>
		<dc:creator>How to improve PHP session security &#124; A blend of programming and seo &#124; Webmaster Tools</dc:creator>
		<pubDate>Thu, 23 Apr 2009 15:38:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawseo.com/news/?p=843#comment-652</guid>
		<description>[...] View original here:Â  How to improve PHP session security &#124; A blend of programming and seo [...]</description>
		<content:encoded><![CDATA[<p>[...] View original here:Â  How to improve PHP session security | A blend of programming and seo [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EllisGL</title>
		<link>http://www.rawseo.com/news/2009/04/23/how-to-improve-php-session-security/comment-page-1/#comment-648</link>
		<dc:creator>EllisGL</dc:creator>
		<pubDate>Thu, 23 Apr 2009 14:01:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.rawseo.com/news/?p=843#comment-648</guid>
		<description>My version is mostly the same, but just creates a new session.

// Secure the session.
if(isset($_SESSION[&#039;HTTP_USER_AGENT&#039;]))
 {
  if($_SESSION[&#039;HTTP_USER_AGENT&#039;] != md5($_SERVER[&#039;HTTP_USER_AGENT&#039;]))
   {
    session_regenerate_id();
    $_SESSION[&#039;HTTP_USER_AGENT&#039;] = md5($_SERVER[&#039;HTTP_USER_AGENT&#039;]);
   }
 }
else
 {
  $_SESSION[&#039;HTTP_USER_AGENT&#039;] = md5($_SERVER[&#039;HTTP_USER_AGENT&#039;]);
 }</description>
		<content:encoded><![CDATA[<p>My version is mostly the same, but just creates a new session.</p>
<p>// Secure the session.<br />
if(isset($_SESSION['HTTP_USER_AGENT']))<br />
 {<br />
  if($_SESSION['HTTP_USER_AGENT'] != md5($_SERVER['HTTP_USER_AGENT']))<br />
   {<br />
    session_regenerate_id();<br />
    $_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);<br />
   }<br />
 }<br />
else<br />
 {<br />
  $_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);<br />
 }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
