|
From: FlorinCB <ory...@us...> - 2009-01-24 07:30:09
|
Update of /cvsroot/mxbb/phpbb2mxp In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv16598 Modified Files: common.php extension.inc login.php Log Message: fixes Index: common.php =================================================================== RCS file: /cvsroot/mxbb/phpbb2mxp/common.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** common.php 24 Jan 2009 05:09:45 -0000 1.3 --- common.php 24 Jan 2009 07:30:05 -0000 1.4 *************** *** 28,37 **** //error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables error_reporting(E_ALL ^ E_NOTICE); // Report all errors, except notices ! set_magic_quotes_runtime(0); // Disable magic_quotes_runtime // The following code (unsetting globals) // Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files ! // PHP5 with register_long_arrays off? if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { --- 28,57 ---- //error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables error_reporting(E_ALL ^ E_NOTICE); // Report all errors, except notices ! ! // If we are on PHP >= 6.0.0 we do not need some code ! if (version_compare(PHP_VERSION, '6.0.0-dev', '>=')) ! { ! /** ! * @ignore ! */ ! define('STRIP', false); ! } ! else ! { ! set_magic_quotes_runtime(0); ! ! // Be paranoid with passed vars ! if (@ini_get('register_globals') == '1' || strtolower(@ini_get('register_globals')) == 'on' || !function_exists('ini_get')) ! { ! @deregister_globals(); ! } ! ! define('STRIP', (get_magic_quotes_gpc()) ? true : false); ! } // The following code (unsetting globals) // Thanks to Matt Kavanagh and Stefan Esser for providing feedback as well as patch files ! // PHP5 with register_long_arrays off? This is requested in class mx_request_vars, do not change! if (@phpversion() >= '5.0.0' && (!@ini_get('register_long_arrays') || @ini_get('register_long_arrays') == '0' || strtolower(@ini_get('register_long_arrays')) == 'off')) { *************** *** 95,166 **** // - // addslashes to vars if magic_quotes_gpc is off - // this is a security precaution to prevent someone - // trying to break out of a SQL statement. - // - if( !get_magic_quotes_gpc() ) - { - if( is_array($HTTP_GET_VARS) ) - { - while( list($k, $v) = each($HTTP_GET_VARS) ) - { - if( is_array($HTTP_GET_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) ) - { - $HTTP_GET_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_GET_VARS[$k]); - } - else - { - $HTTP_GET_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_GET_VARS); - } - - if( is_array($HTTP_POST_VARS) ) - { - while( list($k, $v) = each($HTTP_POST_VARS) ) - { - if( is_array($HTTP_POST_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) - { - $HTTP_POST_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_POST_VARS[$k]); - } - else - { - $HTTP_POST_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_POST_VARS); - } - - if( is_array($HTTP_COOKIE_VARS) ) - { - while( list($k, $v) = each($HTTP_COOKIE_VARS) ) - { - if( is_array($HTTP_COOKIE_VARS[$k]) ) - { - while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) ) - { - $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2); - } - @reset($HTTP_COOKIE_VARS[$k]); - } - else - { - $HTTP_COOKIE_VARS[$k] = addslashes($v); - } - } - @reset($HTTP_COOKIE_VARS); - } - } - - // // Define some basic configuration arrays this also prevents // malicious rewriting of language and otherarray values via --- 115,118 ---- *************** *** 196,199 **** --- 148,157 ---- unset($dbpasswd); + //Temp fix for timezone + if (@function_exists('date_default_timezone_set') && @function_exists('date_default_timezone_get')) + { + @date_default_timezone_set(@date_default_timezone_get()); + } + // // Obtain and encode users IP *************** *** 239,243 **** /* +mxbb_portal ! /* if( !defined('IN_ADMIN') ) --- 197,201 ---- /* +mxbb_portal ! */ if( !defined('IN_ADMIN') ) |