Update of /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs
In directory usw-pr-cvs1:/tmp/cvs-serv12784/chat/lib/index_libs
Modified Files:
main_index.lib.php3
Log Message:
previous version was a bit unsecure (storing session id in cache file)
Index: main_index.lib.php3
===================================================================
RCS file: /cvsroot/phpmychat/phpMyChat-0.15/chat/lib/index_libs/main_index.lib.php3,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -r1.49 -r1.50
*** main_index.lib.php3 2001/12/08 11:07:59 1.49
--- main_index.lib.php3 2001/12/08 11:32:14 1.50
***************
*** 844,848 ****
// Cache is up to date, we use it
$flagsCode = implode('', $cacheFile);
! $flagsCode = ereg_replace('dbSessionId=(.{32})', dbSessionSID('GET'), $flagsCode);
}
else
--- 844,848 ----
// Cache is up to date, we use it
$flagsCode = implode('', $cacheFile);
! unset($cacheFile);
}
else
***************
*** 856,860 ****
$i++;
$flagsCode .= "\t\t\t\t\t\t\t";
! $flagsCode .= '<a href="' . $action . '?' . dbSessionSID('GET') . $pmcQueryArgSeparator . 'lang=' . $name . '">';
$flagsCode .= '<img src="' . _CHAT_PATH . 'localization/' . $name . '/flag.gif" border="0" width="24" height="16" alt="' . ucfirst(str_replace('_', ' ', $name)) . '" /></a>';
if ($i % 15 == 0 && $i < count($availableLanguages))
--- 856,860 ----
$i++;
$flagsCode .= "\t\t\t\t\t\t\t";
! $flagsCode .= '<a href="' . $action . '?%pma_sid%' . $pmcQueryArgSeparator . 'lang=' . $name . '">';
$flagsCode .= '<img src="' . _CHAT_PATH . 'localization/' . $name . '/flag.gif" border="0" width="24" height="16" alt="' . ucfirst(str_replace('_', ' ', $name)) . '" /></a>';
if ($i % 15 == 0 && $i < count($availableLanguages))
***************
*** 872,876 ****
unset($availableLanguages);
! echo $flagsCode;
unset($flagsCode);
?>
--- 872,876 ----
unset($availableLanguages);
! echo str_replace('%pma_sid%', dbSessionSID('GET'), $flagsCode);
unset($flagsCode);
?>
|