1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/16690] Fix htmlspecialchars and htmlspecialchars_decode default flag

PHPBB3-16690
This commit is contained in:
rxu
2021-01-20 00:01:20 +07:00
parent ddf5de8349
commit 2fd4dbb685
73 changed files with 206 additions and 206 deletions

View File

@@ -57,7 +57,7 @@ class obtain_server_data extends \phpbb\install\task_base implements \phpbb\inst
$server_name = strtolower(htmlspecialchars_decode($this->io_handler->get_header_variable(
'Host',
$this->io_handler->get_server_variable('SERVER_NAME')
)));
), ENT_COMPAT));
// HTTP HOST can carry a port number...
if (strpos($server_name, ':') !== false)
@@ -65,11 +65,11 @@ class obtain_server_data extends \phpbb\install\task_base implements \phpbb\inst
$server_name = substr($server_name, 0, strpos($server_name, ':'));
}
$script_path = htmlspecialchars_decode($this->io_handler->get_server_variable('PHP_SELF'));
$script_path = htmlspecialchars_decode($this->io_handler->get_server_variable('PHP_SELF'), ENT_COMPAT);
if (!$script_path)
{
$script_path = htmlspecialchars_decode($this->io_handler->get_server_variable('REQUEST_URI'));
$script_path = htmlspecialchars_decode($this->io_handler->get_server_variable('REQUEST_URI'), ENT_COMPAT);
}
$script_path = str_replace(array('\\', '//'), '/', $script_path);

View File

@@ -87,7 +87,7 @@ class obtain_update_ftp_data extends task_base
$ftp_host = $this->iohandler->get_input('ftp_host', '', true);
$ftp_user = $this->iohandler->get_input('ftp_user', '', true);
$ftp_pass = htmlspecialchars_decode($this->iohandler->get_input('ftp_pass', '', true));
$ftp_pass = htmlspecialchars_decode($this->iohandler->get_input('ftp_pass', '', true), ENT_COMPAT);
$ftp_path = $this->iohandler->get_input('ftp_path', '', true);
$ftp_port = $this->iohandler->get_input('ftp_port', 21);
$ftp_time = $this->iohandler->get_input('ftp_timeout', 10);