mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-28 00:39:19 +01:00
"limiting the size of a session-file which gets read to list the sessions, to prefent admin users being not able to log in because of a \"runaway\" session of any other user"
This commit is contained in:
parent
d7eebb964a
commit
5224372bfc
@ -214,8 +214,18 @@
|
||||
{
|
||||
return $values;
|
||||
}
|
||||
if (!($max_session_size = ini_get('memory_limit'))) $max_session_size = '16M';
|
||||
switch(strtoupper(substr($max_session_size,-1)))
|
||||
{
|
||||
case 'M': $max_session_size *= 1024*1024; break;
|
||||
case 'K': $max_session_size *= 1024; break;
|
||||
}
|
||||
$max_session_size /= 4; // use at max 1/4 of the memory_limit to read sessions, the others get ignored
|
||||
|
||||
while (($file = readdir($dir)))
|
||||
{
|
||||
if (filesize($path.'/'.$file) >= $max_session_size) continue;
|
||||
|
||||
if (substr($file,0,5) != 'sess_' || $session_cache[$file] === false)
|
||||
{
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user