1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/security-180] Always fail when redirecting to an insecure URL

SECURITY-180
This commit is contained in:
Joas Schilling
2015-04-11 17:08:28 +02:00
parent bca1b96b2e
commit ee658bfe7b
2 changed files with 4 additions and 4 deletions

View File

@@ -2492,7 +2492,7 @@ function redirect($url, $return = false, $disable_cd_check = false)
// Attention: only able to redirect within the same domain if $disable_cd_check is false (yourdomain.com -> www.yourdomain.com will not work)
if (!$disable_cd_check && $url_parts['host'] !== $user->host)
{
$url = generate_board_url();
trigger_error('Tried to redirect to potentially insecure url.', E_USER_ERROR);
}
}
else if ($url[0] == '/')