diff options
author | Andrey Andreev <narf@bofh.bg> | 2013-03-03 17:24:07 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2013-03-03 17:24:07 +0100 |
commit | c59498655bd9e919812ad4da8e7c7be1e0e73100 (patch) | |
tree | 8b7c9163bf34b8b4c697adc7a508871f3d92b611 | |
parent | c7db6dc5be8de658fe6ec56e4ba342f34387302e (diff) | |
parent | 930d8ef0f04688e63cfcdaa6f0f7b073e7b644ff (diff) |
Merge pull request #2295 from k3mist/fix-user-agent-match
Fix Session cookie driver storing untrimmed user agent string in the dat...
-rw-r--r-- | system/libraries/Session/drivers/Session_cookie.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/system/libraries/Session/drivers/Session_cookie.php b/system/libraries/Session/drivers/Session_cookie.php index 057e5a1d1..0e8644102 100644 --- a/system/libraries/Session/drivers/Session_cookie.php +++ b/system/libraries/Session/drivers/Session_cookie.php @@ -494,7 +494,7 @@ class CI_Session_cookie extends CI_Session_driver { $this->userdata = array( 'session_id' => $this->_make_sess_id(), 'ip_address' => $this->CI->input->ip_address(), - 'user_agent' => substr($this->CI->input->user_agent(), 0, 120), + 'user_agent' => trim(substr($this->CI->input->user_agent(), 0, 120)), 'last_activity' => $this->now, ); |