Commit 8b6a42fa62089059cb1a77ca2e427178634e15f9
1 parent
cfac9da9
Trim the IP from the database, as some databases will return the full
size of the CHAR(30). git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3301 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
2 additions
and
2 deletions
lib/session/Session.inc
| @@ -129,7 +129,7 @@ class Session { | @@ -129,7 +129,7 @@ class Session { | ||
| 129 | $iUserID = $sql->f("user_id"); | 129 | $iUserID = $sql->f("user_id"); |
| 130 | $ip = $this->getClientIP(); | 130 | $ip = $this->getClientIP(); |
| 131 | // check that ip matches | 131 | // check that ip matches |
| 132 | - if ($ip == $sql->f("ip")) { | 132 | + if ($ip == trim($sql->f("ip"))) { |
| 133 | // now check if the timeout has been exceeded | 133 | // now check if the timeout has been exceeded |
| 134 | $lastused = $sql->f("lastused"); | 134 | $lastused = $sql->f("lastused"); |
| 135 | $diff = time() - strtotime($lastused); | 135 | $diff = time() - strtotime($lastused); |
| @@ -181,7 +181,7 @@ class Session { | @@ -181,7 +181,7 @@ class Session { | ||
| 181 | 181 | ||
| 182 | // remove old sessions | 182 | // remove old sessions |
| 183 | Session::removeStaleSessions(); | 183 | Session::removeStaleSessions(); |
| 184 | - | 184 | + |
| 185 | // return the status | 185 | // return the status |
| 186 | return $sessionStatus; | 186 | return $sessionStatus; |
| 187 | } | 187 | } |