mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/11997] Add user's page dir to redirect path and fix unit tests for it
The user's page directory needs to be added to the redirect URL for proper redirects outside of the forum root. Fix the unit tests accordingly. PHPBB3-11997
This commit is contained in:
@@ -2708,7 +2708,14 @@ function redirect($url, $return = false, $disable_cd_check = false)
|
||||
}
|
||||
}
|
||||
|
||||
$url = generate_board_url() . '/' . $phpbb_path_helper->remove_web_root_path($url);
|
||||
$url = $phpbb_path_helper->remove_web_root_path($url);
|
||||
|
||||
if ($user->page['page_dir'])
|
||||
{
|
||||
$url = $user->page['page_dir'] . '/' . $url;
|
||||
}
|
||||
|
||||
$url = generate_board_url() . '/' . $url;
|
||||
}
|
||||
|
||||
// Clean URL and check if we go outside the forum directory
|
||||
|
Reference in New Issue
Block a user