[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc/sessions class.sessions_php.inc.php
From: |
Dave Hall |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc/sessions class.sessions_php.inc.php |
Date: |
Tue, 03 Apr 2007 11:27:36 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 07/04/03 11:27:36
Modified files:
inc/sessions : class.sessions_php.inc.php
Log message:
check perms before trying to read session files, ported from 16. Minor
formatting
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/sessions/class.sessions_php.inc.php?cvsroot=phpgwapi&r1=1.2&r2=1.3
Patches:
Index: class.sessions_php.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/sessions/class.sessions_php.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- class.sessions_php.inc.php 20 Mar 2007 10:02:23 -0000 1.2
+++ class.sessions_php.inc.php 3 Apr 2007 11:27:36 -0000 1.3
@@ -8,7 +8,7 @@
* @license http://www.fsf.org/licenses/lgpl.html GNU Lesser General
Public License
* @package phpgwapi
* @subpackage sessions
- * @version $Id: class.sessions_php.inc.php,v 1.2 2007/03/20 10:02:23
sigurdne Exp $
+ * @version $Id: class.sessions_php.inc.php,v 1.3 2007/04/03 11:27:36
skwashd Exp $
*/
/**
@@ -227,17 +227,22 @@
unset($session_cache[$file]);
}
}
- if (!isset($session_cache[$file])) // not
in cache, read and cache it
+ if ( !isset($session_cache[$file]) &&
is_readable($file) ) // not in cache, read and cache it
{
$fd = fopen ($path . '/' . $file,'r');
$fs = filesize ($path . '/' . $file);
+
// handle filesize 0 because php recently warns if fread is
used on 0byte files
- if ($fs > 0) {
+ if ($fs > 0)
+ {
$session = fread ($fd, filesize ($path . '/' . $file));
- } else {
+ }
+ else
+ {
$session = '';
}
fclose ($fd);
+
if (substr($session,0,14) !=
'phpgw_session|')
{
continue;
@@ -246,6 +251,7 @@
unset($session['phpgw_app_sessions']);
// not needed, saves memory
$session_cache[$file] = $session;
}
+
if ($session['session_flags'] == 'A' ||
!$session['session_id'] ||
$session['session_install_id'] !=
$GLOBALS['phpgw_info']['server']['install_id'])
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] phpgwapi/inc/sessions class.sessions_php.inc.php,
Dave Hall <=