From 59c26339c0dbf262116c9f1c562bc07034a9ed74 Mon Sep 17 00:00:00 2001 From: Derek Allard Date: Mon, 1 Oct 2007 12:17:39 +0000 Subject: Fixed a bug in the Session library where user agent matching would fail on user agents ending with a space. --- system/libraries/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries/Session.php') diff --git a/system/libraries/Session.php b/system/libraries/Session.php index 819c3f5ef..9dd277073 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -220,7 +220,7 @@ class CI_Session { } // 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; -- cgit v1.2.3-24-g4f1b