diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-11-12 10:30:27 +0100 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-11-12 15:42:23 +0100 |
commit | 6d533d2f8630d5bed2bfdbfd09cc9c689fbad1b5 (patch) | |
tree | 38f9fb1f71a00ae147a9adf74c8af410fa8e9fea /phpBB/phpbb | |
parent | cd6085ebdc3780d1b4551da5fa93d18acc4d11e5 (diff) | |
download | forums-6d533d2f8630d5bed2bfdbfd09cc9c689fbad1b5.tar forums-6d533d2f8630d5bed2bfdbfd09cc9c689fbad1b5.tar.gz forums-6d533d2f8630d5bed2bfdbfd09cc9c689fbad1b5.tar.bz2 forums-6d533d2f8630d5bed2bfdbfd09cc9c689fbad1b5.tar.xz forums-6d533d2f8630d5bed2bfdbfd09cc9c689fbad1b5.zip |
[ticket/13280] Revert "Merge pull request #3107 from marc1706/ticket/13280"
This reverts commit a1b58d05d158ff7afd789c1b27821e17198f8d58, reversing
changes made to 0e772afb9db640e54e84cfccaddcf74f3edbb3fb.
PHPBB3-13280
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/session.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/symfony_request.php | 10 |
2 files changed, 4 insertions, 12 deletions
diff --git a/phpBB/phpbb/session.php b/phpBB/phpbb/session.php index a06ff9c594..14b4c63207 100644 --- a/phpBB/phpbb/session.php +++ b/phpBB/phpbb/session.php @@ -43,7 +43,7 @@ class session // First of all, get the request uri... $script_name = $symfony_request->getScriptName(); - $args = explode('&', $symfony_request->getQueryString()); + $args = explode('&', $symfony_request->getQueryString()); // If we are unable to get the script name we use REQUEST_URI as a failover and note it within the page array for easier support... if (!$script_name) @@ -61,8 +61,8 @@ class session // 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', '%22', '%3C', '%3E'); + $find = array('"', "'", '<', '>'); + $replace = array('%22', '%27', '%3C', '%3E'); foreach ($args as $key => $argument) { diff --git a/phpBB/phpbb/symfony_request.php b/phpBB/phpbb/symfony_request.php index 02d22c480f..ad949a35f2 100644 --- a/phpBB/phpbb/symfony_request.php +++ b/phpBB/phpbb/symfony_request.php @@ -30,12 +30,6 @@ class symfony_request extends Request $type_cast_helper->set_var($value, $value, gettype($value), true); }; - // This function is meant for additional handling of server variables - $server_sanitizer = function(&$value, $key) use ($sanitizer) { - $sanitizer($value, $key); - $value = str_replace('&', '&', $value); - }; - $get_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::GET); $post_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::POST); $server_parameters = $phpbb_request->get_super_global(\phpbb\request\request_interface::SERVER); @@ -44,12 +38,10 @@ class symfony_request extends Request array_walk_recursive($get_parameters, $sanitizer); array_walk_recursive($post_parameters, $sanitizer); + array_walk_recursive($server_parameters, $sanitizer); array_walk_recursive($files_parameters, $sanitizer); array_walk_recursive($cookie_parameters, $sanitizer); - // Run special sanitizer for server superglobal - array_walk_recursive($server_parameters, $server_sanitizer); - parent::__construct($get_parameters, $post_parameters, array(), $cookie_parameters, $files_parameters, $server_parameters); } } |