Commits

Greg Aker committed e3c9990

Altered Session to use a longer match against the user_agent string. See upgrade notes if using database sessions.</li

  • Participants
  • Parent commits 432da06

Comments (0)

Files changed (4)

File system/libraries/Session.php

 		}
 
 		// Does the User Agent Match?
-		if ($this->sess_match_useragent == TRUE AND trim($session['user_agent']) != trim(substr($this->CI->input->user_agent(), 0, 50)))
+		if ($this->sess_match_useragent == TRUE AND trim($session['user_agent']) != trim(substr($this->CI->input->user_agent(), 0, 120)))
 		{
 			$this->sess_destroy();
 			return FALSE;
 		$this->userdata = array(
 							'session_id'	=> md5(uniqid($sessid, TRUE)),
 							'ip_address'	=> $this->CI->input->ip_address(),
-							'user_agent'	=> substr($this->CI->input->user_agent(), 0, 50),
+							'user_agent'	=> substr($this->CI->input->user_agent(), 0, 120),
 							'last_activity'	=> $this->now
 							);
 

File user_guide/changelog.html

 			<li>Added an optional third parameter to <samp>heading()</samp> which allows adding html attributes to the rendered heading tag.</li>
 		</ul>
 	</li>
+	<li>Libraries
+		<ul>
+			<li>Altered Session to use a longer match against the user_agent string. See upgrade notes if using database sessions.</li>
+		</ul>
+	</li>
 </ul>
 
 <h3>Bug fixes for 2.0.3</h3>

File user_guide/installation/upgrade_203.html

 
 <p>If you are using database sessions with the CI Session Library, please update your <samp>ci_sessions</samp> database table as follows:</p>
 
-<code>	
+<code>
 	CREATE INDEX last_activity_idx ON ci_sessions(last_activity);
+	ALTER TABLE ci_sessions MODIFY user_agent VARCHAR(120);
 </code>	
 	
 	

File user_guide/libraries/sessions.html

 CREATE TABLE IF NOT EXISTS  `ci_sessions` (
 	session_id varchar(40) DEFAULT '0' NOT NULL,
 	ip_address varchar(16) DEFAULT '0' NOT NULL,
-	user_agent varchar(50) NOT NULL,
+	user_agent varchar(120) NOT NULL,
 	last_activity int(10) unsigned DEFAULT 0 NOT NULL,
 	user_data text NOT NULL,
 	PRIMARY KEY (session_id),