[Cs-webapplibs-commits] SF.net SVN: cs-webapplibs:[181] trunk/0.3/cs_sessionDB.class.php
Status: Beta
Brought to you by:
crazedsanity
From: <cra...@us...> - 2010-07-31 17:50:19
|
Revision: 181 http://cs-webapplibs.svn.sourceforge.net/cs-webapplibs/?rev=181&view=rev Author: crazedsanity Date: 2010-07-31 17:50:13 +0000 (Sat, 31 Jul 2010) Log Message: ----------- Fix issue where session ID's aren't necessarily 32 characters long. /cs_sessionDB.class.php: * is_valid_sid(): -- length must be at least 20 (not 32) characters. * sessdb_write(): -- more info in the exception details. Modified Paths: -------------- trunk/0.3/cs_sessionDB.class.php Modified: trunk/0.3/cs_sessionDB.class.php =================================================================== --- trunk/0.3/cs_sessionDB.class.php 2010-07-23 14:17:25 UTC (rev 180) +++ trunk/0.3/cs_sessionDB.class.php 2010-07-31 17:50:13 UTC (rev 181) @@ -114,7 +114,7 @@ //------------------------------------------------------------------------- protected function is_valid_sid($sid) { $isValid = false; - if(strlen($sid) == 32) { + if(strlen($sid) >= 20) { try { $sql = "SELECT * FROM ". $this->tableName ." WHERE session_id='". $sid ."'"; @@ -231,7 +231,7 @@ } catch(exception $e) { //umm... yeah. - $this->exception_handler(__METHOD__ .": failed to perform action (". $type .")::: ". $e->getMessage()); + $this->exception_handler(__METHOD__ .": failed to perform action (". $type ."), sid=(". $sid ."), sid length=(". strlen($sid) ."), validSid=(". $this->is_valid_sid($sid) .")::: ". $e->getMessage()); } return(true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |