mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-25 04:23:38 +01:00
[ticket/9801] Allow display of page outside board directory on viewonline
Until now, the preg_match didn't take into account that a page might be outside the board directory. After this change, the regular expression will allow preceding dots and slashes. Paths like ../../test.php will be allowed. The page will be unknown in viewonline.php and it will revert to index.php as current page. However, the core.viewonline_overwrite_location event will receive proper info of the page the user is on right now allowing a listener to change the info that is being displayed. PHPBB3-9801
This commit is contained in:
parent
694f8391c9
commit
204904441a
@ -213,7 +213,7 @@ while ($row = $db->sql_fetchrow($result))
|
||||
continue;
|
||||
}
|
||||
|
||||
preg_match('#^([a-z0-9/_-]+)#i', $row['session_page'], $on_page);
|
||||
preg_match('#^([./\\]*+[a-z0-9/_-]+)#i', $row['session_page'], $on_page);
|
||||
if (!sizeof($on_page))
|
||||
{
|
||||
$on_page[1] = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user