aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2014-11-09 20:01:20 +0100
committerMarc Alexander <admin@m-a-styles.de>2014-11-09 20:01:20 +0100
commit6a4cb42565d7e1663da4d02cd8d624b034b20afe (patch)
tree76c82699e78c7ad3d797f81a538ad25ec22487be
parent7ab774bc8d34493306b94b06267b4c36aebffc22 (diff)
parentd60534d52c5fbf05bc9aad14a6767eba0c0ffb68 (diff)
downloadforums-6a4cb42565d7e1663da4d02cd8d624b034b20afe.tar
forums-6a4cb42565d7e1663da4d02cd8d624b034b20afe.tar.gz
forums-6a4cb42565d7e1663da4d02cd8d624b034b20afe.tar.bz2
forums-6a4cb42565d7e1663da4d02cd8d624b034b20afe.tar.xz
forums-6a4cb42565d7e1663da4d02cd8d624b034b20afe.zip
Merge pull request #3113 from prototech/ticket/13251
[ticket/13251] Escape container parameters defined from config.php.
-rw-r--r--phpBB/phpbb/di/extension/config.php28
1 files changed, 18 insertions, 10 deletions
diff --git a/phpBB/phpbb/di/extension/config.php b/phpBB/phpbb/di/extension/config.php
index 27ebc94bae..7984a783df 100644
--- a/phpBB/phpbb/di/extension/config.php
+++ b/phpBB/phpbb/di/extension/config.php
@@ -39,16 +39,24 @@ class config extends Extension
*/
public function load(array $config, ContainerBuilder $container)
{
- $container->setParameter('core.adm_relative_path', ($this->config_php->get('phpbb_adm_relative_path') ? $this->config_php->get('phpbb_adm_relative_path') : 'adm/'));
- $container->setParameter('core.table_prefix', $this->config_php->get('table_prefix'));
- $container->setParameter('cache.driver.class', $this->convert_30_acm_type($this->config_php->get('acm_type')));
- $container->setParameter('dbal.driver.class', $this->config_php->convert_30_dbms_to_31($this->config_php->get('dbms')));
- $container->setParameter('dbal.dbhost', $this->config_php->get('dbhost'));
- $container->setParameter('dbal.dbuser', $this->config_php->get('dbuser'));
- $container->setParameter('dbal.dbpasswd', $this->config_php->get('dbpasswd'));
- $container->setParameter('dbal.dbname', $this->config_php->get('dbname'));
- $container->setParameter('dbal.dbport', $this->config_php->get('dbport'));
- $container->setParameter('dbal.new_link', defined('PHPBB_DB_NEW_LINK') && PHPBB_DB_NEW_LINK);
+ $parameters = array(
+ 'core.adm_relative_path' => $this->config_php->get('phpbb_adm_relative_path') ? $this->config_php->get('phpbb_adm_relative_path') : 'adm/',
+ 'core.table_prefix' => $this->config_php->get('table_prefix'),
+ 'cache.driver.class' => $this->convert_30_acm_type($this->config_php->get('acm_type')),
+ 'dbal.driver.class' => $this->config_php->convert_30_dbms_to_31($this->config_php->get('dbms')),
+ 'dbal.dbhost' => $this->config_php->get('dbhost'),
+ 'dbal.dbuser' => $this->config_php->get('dbuser'),
+ 'dbal.dbpasswd' => $this->config_php->get('dbpasswd'),
+ 'dbal.dbname' => $this->config_php->get('dbname'),
+ 'dbal.dbport' => $this->config_php->get('dbport'),
+ 'dbal.new_link' => defined('PHPBB_DB_NEW_LINK') && PHPBB_DB_NEW_LINK,
+ );
+ $parameter_bag = $container->getParameterBag();
+
+ foreach ($parameters as $parameter => $value)
+ {
+ $container->setParameter($parameter, $parameter_bag->escapeValue($value));
+ }
}
/**