Fixed a bug in the Session library where user agent matching would fail on user agents ending with a space.
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index 819c3f5..9dd2770 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -220,7 +220,7 @@
 		}

 		

 		// Does the User Agent Match?

-		if ($this->CI->config->item('sess_match_useragent') == TRUE AND $session['user_agent'] != substr($this->CI->input->user_agent(), 0, 50))

+		if ($this->CI->config->item('sess_match_useragent') == TRUE AND trim($session['user_agent']) != trim(substr($this->CI->input->user_agent(), 0, 50)))

 		{

 			$this->sess_destroy();

 			return FALSE;

diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index 06215f7..78e1ecb 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -75,6 +75,7 @@
     <li>Documented the timezones() function in the <a href="./helpers/date_helper.html">Date Helper</a>.</li>

     <li>Documented unset_userdata in the <a href="./libraries/sessions.html">Session class</a>.</li>

     <li>Fixed a bug in <a href="./libraries/validation.html">Validation</a> where valid_ip() wasn't called properly</li>

+    <li>Fixed a bug in the Session library where user agent matching would fail on user agents ending with a space. </li>

     <li>Fixed a bug in database driver where num_rows property wasn't getting updated.</li>

     <li>Fixed a bug in captcha calling an invalid PHP function.</li>

     <li>Fixed a bug in _html_entity_decode_callback() when 'global_xss_filtering' is enabled.</li>