From: Tomas K. <to...@us...> - 2006-07-18 07:58:37
|
Update of /cvsroot/squirrelmail/squirrelmail/functions In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21754/functions Modified Files: Tag: SM-1_4-STABLE global.php plugin.php Log Message: turn on session cookies and make sure that plugins don't output whitespace when plugins/*/setup.php files are loaded. Index: global.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/global.php,v retrieving revision 1.27.2.17 retrieving revision 1.27.2.18 diff -u -w -r1.27.2.17 -r1.27.2.18 --- global.php 2 Jun 2006 02:52:15 -0000 1.27.2.17 +++ global.php 18 Jul 2006 07:58:34 -0000 1.27.2.18 @@ -31,6 +31,18 @@ */ ini_set('magic_quotes_runtime','0'); +/** + * [#1518885] session.use_cookies = off breaks SquirrelMail + * + * When session cookies are not used, all http redirects, meta refreshes, + * src/download.php and javascript URLs are broken. Setting must be set + * before session is started. + */ +if (!(bool)ini_get('session.use_cookies') || + ini_get('session.use_cookies') == 'off') { + ini_set('session.use_cookies','1'); +} + /* convert old-style superglobals to current method * this is executed if you are running PHP 4.0.x. * it is run via a require_once directive in validate.php Index: plugin.php =================================================================== RCS file: /cvsroot/squirrelmail/squirrelmail/functions/plugin.php,v retrieving revision 1.30.2.6 retrieving revision 1.30.2.7 diff -u -w -r1.30.2.6 -r1.30.2.7 --- plugin.php 14 Apr 2006 22:27:08 -0000 1.30.2.6 +++ plugin.php 18 Jul 2006 07:58:34 -0000 1.30.2.7 @@ -191,9 +191,17 @@ /* On startup, register all plugins configured for use. */ if (isset($plugins) && is_array($plugins)) { + // turn on output buffering in order to prevent output of new lines + ob_start(); foreach ($plugins as $name) { use_plugin($name); } + $output = trim(ob_get_contents()); + ob_end_clean(); + // if plugins output more than newlines and spacing, stop script execution. + if (!empty($output)) { + die($output); + } } ?> \ No newline at end of file |