diff options
Diffstat (limited to 'phpBB/phpbb/request/request.php')
-rw-r--r-- | phpBB/phpbb/request/request.php | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/phpBB/phpbb/request/request.php b/phpBB/phpbb/request/request.php index 3171a6edb7..56ce3999ed 100644 --- a/phpBB/phpbb/request/request.php +++ b/phpBB/phpbb/request/request.php @@ -1,9 +1,13 @@ <?php /** * -* @package \phpbb\request\request -* @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ @@ -14,8 +18,6 @@ namespace phpbb\request; * * It provides a method to disable access to input data through super globals. * This should force MOD authors to read about data validation. -* -* @package \phpbb\request\request */ class request implements \phpbb\request\request_interface { @@ -273,7 +275,7 @@ class request implements \phpbb\request\request_interface */ public function file($form_name) { - return $this->variable($form_name, array('name' => 'none'), false, \phpbb\request\request_interface::FILES); + return $this->variable($form_name, array('name' => 'none'), true, \phpbb\request\request_interface::FILES); } /** @@ -414,4 +416,27 @@ class request implements \phpbb\request\request_interface { return $this->input[$super_global]; } + + /** + * {@inheritdoc} + */ + public function escape($var, $multibyte) + { + if (is_array($var)) + { + $result = array(); + foreach ($var as $key => $value) + { + $this->type_cast_helper->set_var($key, $key, gettype($key), $multibyte); + $result[$key] = $this->escape($value, $multibyte); + } + $var = $result; + } + else + { + $this->type_cast_helper->set_var($var, $var, 'string', $multibyte); + } + + return $var; + } } |