Commit 1f78418c authored by Jigal van Hemert's avatar Jigal van Hemert Committed by Christian Kuhn
Browse files

[TASK] Hide new db settings in Configuration module

Just like the old db settings the new settings for doctrine should
not be displayed in the Configuration module. Old settings are also
blinded as they can still exist in AdditionalConfiguration.php

Only existing settings are overwritten, previously the blinded options
were added to the settings if they didn't exist.

Resolves: #76020
Releases: master
Change-Id: I2a24b8c0841472a8415bd455c99b5ab8dd4f49f4
Reviewed-on: https://review.typo3.org/47995


Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
Reviewed-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn's avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: Oliver Hader's avatarOliver Hader <oliver.hader@typo3.org>
parent 6dddf4a1
......@@ -63,7 +63,17 @@ class ConfigurationView extends BaseScriptClass
'password' => '******',
'port' => '******',
'socket' => '******',
'username' => '******'
'username' => '******',
'Connections' => [
'Default' => [
'dbname' => '******',
'host' => '******',
'password' => '******',
'port' => '******',
'user' => '******',
'unix_socket' => '******',
],
],
],
'SYS' => [
'encryptionKey' => '******'
......@@ -78,6 +88,13 @@ class ConfigurationView extends BaseScriptClass
{
$this->view = GeneralUtility::makeInstance(StandaloneView::class);
$this->view->getRequest()->setControllerExtensionName('lowlevel');
// Prepare blinding for all database connection types
foreach (array_keys($GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']) as $connectionName) {
if ($connectionName !== 'Default') {
$this->blindedConfigurationOptions['TYPO3_CONF_VARS']['DB']['Connections'][$connectionName] =
$this->blindedConfigurationOptions['TYPO3_CONF_VARS']['DB']['Connections']['Default'];
}
}
}
/**
......@@ -234,7 +251,7 @@ class ConfigurationView extends BaseScriptClass
// mask sensitive information
$varName = trim($arrayBrowser->varName, '$');
if (isset($this->blindedConfigurationOptions[$varName])) {
ArrayUtility::mergeRecursiveWithOverrule($theVar, $this->blindedConfigurationOptions[$varName]);
ArrayUtility::mergeRecursiveWithOverrule($theVar, ArrayUtility::intersectRecursive($this->blindedConfigurationOptions[$varName], $theVar));
}
$tree = $arrayBrowser->tree($theVar, '', '');
$this->view->assign('tree', $tree);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment