From 8b6a42fa62089059cb1a77ca2e427178634e15f9 Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Wed, 25 May 2005 20:55:04 +0000 Subject: [PATCH] Trim the IP from the database, as some databases will return the full size of the CHAR(30). --- lib/session/Session.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/session/Session.inc b/lib/session/Session.inc index 06163d4..b7bda0d 100644 --- a/lib/session/Session.inc +++ b/lib/session/Session.inc @@ -129,7 +129,7 @@ class Session { $iUserID = $sql->f("user_id"); $ip = $this->getClientIP(); // check that ip matches - if ($ip == $sql->f("ip")) { + if ($ip == trim($sql->f("ip"))) { // now check if the timeout has been exceeded $lastused = $sql->f("lastused"); $diff = time() - strtotime($lastused); @@ -181,7 +181,7 @@ class Session { // remove old sessions Session::removeStaleSessions(); - + // return the status return $sessionStatus; } -- libgit2 0.21.4