Суть бага заключается в том, что используя ссылку вида "viewtopic.php?p=номер_поста" можно скрыто просматривать нужные нам темы, игнорируя права доступа на скрытность пребывания на форуме. Мелочь а не приятно!
Решение проблемы: Открываем viewtopic.php
Находим:
Код: Выделить всё
// Initial var setup
$forum_id = request_var('f', 0);
$topic_id = request_var('t', 0);
$post_id = request_var('p', 0);
$voted_id = request_var('vote_id', array('' => 0));
Код: Выделить всё
// Initial var setup
$forum_id = request_var('f', 0);
$forum_id_temp = $forum_id;
$topic_id = request_var('t', 0);
$topic_id_temp = $topic_id;
$post_id = request_var('p', 0);
$voted_id = request_var('vote_id', array('' => 0));
$jump_to = request_var('e', 0);
if($jump_to == 0) $jump_to=$post_id;
Код: Выделить всё
// Redirect to login or to the correct post upon emailed notification links
if (isset($_GET['e']))
{
$jump_to = request_var('e', 0);
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id");
if ($user->data['user_id'] == ANONYMOUS)
{
login_box($redirect_url . "&p=$post_id&e=$jump_to", $user->lang['LOGIN_NOTIFY_TOPIC']);
}
if ($jump_to > 0)
{
// We direct the already logged in user to the correct post...
redirect($redirect_url . ((!$post_id) ? "&p=$jump_to" : "&p=$post_id") . "#p$jump_to");
}
}
Код: Выделить всё
// Redirect to login or to the correct post upon emailed notification links
if ($jump_to && ($topic_id != $topic_id_temp || $forum_id != $forum_id_temp) || isset($_GET['e']))
{
$redirect_url = append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id");
if ($user->data['user_id'] == ANONYMOUS)
{
login_box($redirect_url . "&p=$post_id&e=$jump_to", $user->lang['LOGIN_NOTIFY_TOPIC']);
}
// We direct the already logged in user to the correct post...
redirect($redirect_url . "&p=$jump_to#p$jump_to");
}

