1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-22 16:22:58 +02:00

[ticket/14875] Add method for raw input to request and add to installer

A method for retrieving raw input has been added to the request class.
This will be used in the installer to retrieve the datatabase password
while also allowing utf8 characters. Not escaping the input is ok in
this case as it won't be put anywhere in this raw form and only be
used to populate the entry for the password field in config.php.

PHPBB3-14875
This commit is contained in:
Marc Alexander
2016-11-25 22:15:13 +01:00
parent 23f5b6debd
commit 9aa017d0f7
5 changed files with 94 additions and 24 deletions

View File

@@ -79,19 +79,10 @@ class obtain_database_data extends \phpbb\install\task_base implements \phpbb\in
$dbhost = $this->io_handler->get_input('dbhost', '', true);
$dbport = $this->io_handler->get_input('dbport', '');
$dbuser = $this->io_handler->get_input('dbuser', '');
$dbpasswd = $this->io_handler->get_raw_input('dbpasswd', '');
$dbname = $this->io_handler->get_input('dbname', '');
$table_prefix = $this->io_handler->get_input('table_prefix', '');
// Need to get untrimmed password when using ajax IO handler
if ($this->io_handler instanceof \phpbb\install\helper\iohandler\ajax_iohandler)
{
$dbpasswd = htmlspecialchars_decode(htmlspecialchars_decode($this->io_handler->get_untrimmed_input('dbpasswd', '', true)));
}
else
{
$dbpasswd = $this->io_handler->get_input('dbpasswd', '', true);
}
// Check database data
$user_data_vaild = $this->check_database_data($dbms, $dbhost, $dbport, $dbuser, $dbpasswd, $dbname, $table_prefix);