diff --git a/lam/lib/config.inc b/lam/lib/config.inc index 5c26bc2e..50b95c91 100644 --- a/lam/lib/config.inc +++ b/lam/lib/config.inc @@ -2701,6 +2701,10 @@ class LAMCfgMain { */ public function importData($data) { foreach ($data as $dataKey => $dataValue) { + if (!in_array($dataKey, $this->settings)) { + logNewMessage(LOG_WARNING, 'Ignored setting during import: ' . $dataKey); + continue; + } if (!(is_array($dataValue) || is_string($dataValue) || is_int($dataValue) || is_bool($dataValue))) { throw new LAMException('Invalid import data type for ' . htmlspecialchars($dataKey) . ': ' . gettype($dataValue)); } diff --git a/lam/tests/lib/LAMCfgMainTest.php b/lam/tests/lib/LAMCfgMainTest.php index 1368311f..812c2a95 100644 --- a/lam/tests/lib/LAMCfgMainTest.php +++ b/lam/tests/lib/LAMCfgMainTest.php @@ -146,6 +146,7 @@ class LAMCfgMainTest extends TestCase { $importData['sessionTimeout'] = 240; $importData['logLevel'] = LOG_ERR; $importData['mailServer'] = 'mailserver'; + $importData['IGNORE_ME'] = 'ignore'; $this->conf->importData($importData);