2.x/Login problemen Lycos

Uit phpBB.nl Wiki
Ga naar: navigatie, zoeken
!! Let op: vanaf 1 januari 2009 wordt phpBB2 niet meer ondersteund door phpBB.nl en phpBB.com.

Deze pagina's dienen uitsluitend als archief.

!!


Er werden regelmatig problemen gemeld met het inloggen bij Lycos, dit is met onderstaande modificatie te verhelpen.

Vind in includes/functions.php onderstaande:

function redirect($url)
{
	global $db, $board_config;

	if (!empty($db))
	{
		$db->sql_close();
	}

	if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r") || strstr(urldecode($url), ';url'))
	{
		message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.');
	}

	$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://';
	$server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name']));
	$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : '';
	$script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path']));
	$script_name = ($script_name == '') ? $script_name : '/' . $script_name;
	$url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url));

	// Redirect via an HTML form for PITA webservers
	if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')))
	{
		header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url);
		echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server_protocol . $server_name . $server_port . $script_name . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server_protocol . $server_name . $server_port . $script_name . $url . '">HERE</a> to be redirected</div></body></html>';
		exit;
	}

Vervang het bovenstaande stuk met onderstaande code:

function redirect($url) 
{ 
global $db, $board_config; 

if (!empty($db)) 
{ 
$db->sql_close(); 
} 

$server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; 
$server_name = preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['server_name'])); 
$server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; 
$script_name = preg_replace('#^/?(.*?)/?$#', '1', trim($board_config['script_path'])); 
$script_name = ($script_name == '') ? $script_name : '/' . $script_name; 
//$url = preg_replace('#^/?(.*?)/?$#', '/1', trim($url)); 

// Redirect via an HTML form for PITA webservers 
if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) 
{ 
header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url); 
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server_protocol . $server_name . $server_port . $script_name . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server_protocol . $server_name . $server_port . $script_name . $url . '">HERE</a> to be redirected</div></body></html>'; 
exit; 
} 

// Behave as per HTTP/1.1 spec for others 
//header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url); 
header('Location: ' . $url); 
exit; 
}

Vergeet niet om alles te kopieren!