Bug Fix for phpBB 2.0.8-2.0.9 UPDATE
Date: Friday, July 16 @ 04:54:54 CEST
Topic: Bug Fixes


There has been a fix added to the phpBB 2.0.8 - 2.0.9 update. Originally the new function added unset_vars was causing problems with you entering the Forums admin. As a workaround (thanks to alphamonkey) open the modules/Forum/common.php and


find this line - around line 27



die("Hacking attempt");

}





After place:






//Unset Vars

function unset_vars(&$var)

{

while (list($var_name, $null) = @each($var))

{

if ( ! ( $var_name == 'phpbb_root_path' || $var_name == 'no_page_header' || $var_name == 'phpEx' || $var_name == 'admin' || $var_name == 'user' || $var_name == 'name' ) )

{

unset($GLOBALS[$var_name]);

}

}

return;

}






Find around line 41:





error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime






After Add:







// Unset globally registered vars - PHP5 ... hhmmm

if (@$ini_val('register_globals') == '1' || strtolower(@$ini_val('register_globals')) == 'on')

{

$var_prefix = 'HTTP';

$var_suffix = '_VARS';


$test = array('_GET', '_POST', '_SERVER', '_COOKIE', '_ENV');


foreach ($test as $var)

{
if (is_array(${
$var_prefix . $var . $var_suffix}))

{

unset_vars(${$var_prefix . $var . $var_suffix});

@reset(${$var_prefix . $var . $var_suffix});

}


if (is_array(${$var}))

{

unset_vars(${$var});

@reset(${$var});

}

}


if (is_array(${'_FILES'}))

{

unset_vars(${'_FILES'});

@reset(${'_FILES'});

}


if (is_array(${'HTTP_POST_FILES'}))

{

unset_vars(${'HTTP_POST_FILES'});

@reset(${'HTTP_POST_FILES'});

}

}





Save it and upload it. The files for download have also been updated so if you don't have hevaily ported forums you can use those.

Manual Change List
Pre Modded Files





This article comes from NukeCops
http://www.nukecops.com

The URL for this story is:
http://www.nukecops.com/modules.php?name=News&file=article&sid=2494