mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
#i61
git-svn-id: file:///svn/phpbb/trunk@8098 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
d45df55af3
commit
cbb286420f
2 changed files with 13 additions and 4 deletions
|
@ -1883,8 +1883,7 @@ function build_url($strip_vars = false)
|
||||||
global $user, $phpbb_root_path;
|
global $user, $phpbb_root_path;
|
||||||
|
|
||||||
// Append SID
|
// Append SID
|
||||||
$redirect = (($user->page['page_dir']) ? $user->page['page_dir'] . '/' : '') . $user->page['page_name'] . (($user->page['query_string']) ? "?{$user->page['query_string']}" : '');
|
$redirect = append_sid($user->page['page'], false, false);
|
||||||
$redirect = append_sid($redirect, false, false);
|
|
||||||
|
|
||||||
// Add delimiter if not there...
|
// Add delimiter if not there...
|
||||||
if (strpos($redirect, '?') === false)
|
if (strpos($redirect, '?') === false)
|
||||||
|
|
|
@ -51,18 +51,28 @@ class session
|
||||||
$script_name = str_replace(array('\\', '//'), '/', $script_name);
|
$script_name = str_replace(array('\\', '//'), '/', $script_name);
|
||||||
|
|
||||||
// Now, remove the sid and let us get a clean query string...
|
// Now, remove the sid and let us get a clean query string...
|
||||||
|
$use_args = array();
|
||||||
|
|
||||||
|
// Since some browser do not encode correctly we need to do this with some "special" characters...
|
||||||
|
// " -> %22, ' => %27, < -> %3C, > -> %3E
|
||||||
|
$find = array('"', "'", '<', '>');
|
||||||
|
$replace = array('%22', '%27', '%3C', '%3E');
|
||||||
|
|
||||||
foreach ($args as $key => $argument)
|
foreach ($args as $key => $argument)
|
||||||
{
|
{
|
||||||
if (strpos($argument, 'sid=') === 0 || strpos($argument, '_f_=') === 0)
|
if (strpos($argument, 'sid=') === 0 || strpos($argument, '_f_=') === 0)
|
||||||
{
|
{
|
||||||
unset($args[$key]);
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$use_args[str_replace($find, $replace, $key)] = str_replace($find, $replace, $argument);
|
||||||
}
|
}
|
||||||
|
unset($args);
|
||||||
|
|
||||||
// The following examples given are for an request uri of {path to the phpbb directory}/adm/index.php?i=10&b=2
|
// The following examples given are for an request uri of {path to the phpbb directory}/adm/index.php?i=10&b=2
|
||||||
|
|
||||||
// The current query string
|
// The current query string
|
||||||
$query_string = trim(implode('&', $args));
|
$query_string = trim(implode('&', $use_args));
|
||||||
|
|
||||||
// basenamed page name (for example: index.php)
|
// basenamed page name (for example: index.php)
|
||||||
$page_name = basename($script_name);
|
$page_name = basename($script_name);
|
||||||
|
|
Loading…
Add table
Reference in a new issue