diff options
author | Daniel Robbins <github@danieljrobbins.com> | 2013-03-02 03:36:48 +0100 |
---|---|---|
committer | Daniel Robbins <github@danieljrobbins.com> | 2013-03-02 03:36:48 +0100 |
commit | 930d8ef0f04688e63cfcdaa6f0f7b073e7b644ff (patch) | |
tree | 8b7c9163bf34b8b4c697adc7a508871f3d92b611 | |
parent | c7db6dc5be8de658fe6ec56e4ba342f34387302e (diff) |
Fix Session cookie driver storing untrimmed user agent string in the database causing set_userdata() calls to fail when $config['sess_match_useragent'] = TRUE
Signed-off-by: Daniel Robbins <github@danieljrobbins.com>
-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, ); |