diff options
author | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-10-05 14:54:47 +0200 |
---|---|---|
committer | Oliver Schramm <oliver.schramm97@gmail.com> | 2017-10-05 14:54:47 +0200 |
commit | 5514b1069968d451adb7eaf89278a6e1e5dc20df (patch) | |
tree | 245b21642c134c4509e46fab60d130065e123624 /phpBB/phpbb/request/request_interface.php | |
parent | 93621aa1844ab48d9bae068d9872d2c49ae86de4 (diff) | |
parent | ca5678cc1c2a1f723d39127e0c066eba6c9a3336 (diff) | |
download | forums-5514b1069968d451adb7eaf89278a6e1e5dc20df.tar forums-5514b1069968d451adb7eaf89278a6e1e5dc20df.tar.gz forums-5514b1069968d451adb7eaf89278a6e1e5dc20df.tar.bz2 forums-5514b1069968d451adb7eaf89278a6e1e5dc20df.tar.xz forums-5514b1069968d451adb7eaf89278a6e1e5dc20df.zip |
Merge pull request #4960 from rxu/ticket/15367
[ticket/15367] Escape special characters in Sphinx search backend
Diffstat (limited to 'phpBB/phpbb/request/request_interface.php')
-rw-r--r-- | phpBB/phpbb/request/request_interface.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/phpbb/request/request_interface.php b/phpBB/phpbb/request/request_interface.php index 47b3b3a4ed..3bfa8bb424 100644 --- a/phpBB/phpbb/request/request_interface.php +++ b/phpBB/phpbb/request/request_interface.php @@ -65,6 +65,28 @@ interface request_interface public function variable($var_name, $default, $multibyte = false, $super_global = \phpbb\request\request_interface::REQUEST); /** + * Get a variable without trimming strings and without escaping. + * This method MUST NOT be used with queries. + * Same functionality as variable(), except does not run trim() on strings + * and does not escape input. + * This method should only be used when the raw input is needed without + * any escaping, i.e. for database password during the installation. + * + * @param string|array $var_name The form variable's name from which data shall be retrieved. + * If the value is an array this may be an array of indizes which will give + * direct access to a value at any depth. E.g. if the value of "var" is array(1 => "a") + * then specifying array("var", 1) as the name will return "a". + * @param mixed $default A default value that is returned if the variable was not set. + * This function will always return a value of the same type as the default. + * @param \phpbb\request\request_interface::POST|GET|REQUEST|COOKIE $super_global + * Specifies which super global should be used + * + * @return mixed The value of $_REQUEST[$var_name] run through {@link set_var set_var} to ensure that the type is the + * the same as that of $default. If the variable is not set $default is returned. + */ + public function raw_variable($var_name, $default, $super_global = \phpbb\request\request_interface::REQUEST); + + /** * Shortcut method to retrieve SERVER variables. * * @param string|array $var_name See \phpbb\request\request_interface::variable |