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;