17 use TYPO3\CMS\Core\Configuration\ConfigurationManager;
58 'BE/spriteIconGenerator_handler',
64 'FE/formmailMaxAttachmentSize',
67 'SYS/t3lib_cs_convMethod',
69 'SYS/maxFileNameLength',
73 'BE/notificationPrefix',
78 'GFX/image_processing',
82 'SYS/curlProxyServer',
83 'SYS/curlProxyTunnel',
84 'SYS/curlProxyUserPass',
87 'BE/niceFlexFormXMLtags',
88 'BE/compactFlexFormXML',
90 'SYS/clearCacheSystem',
92 'SYS/caching/cacheConfigurations/extbase_typo3dbbackend_tablecolumns',
94 'SYS/caching/cacheConfigurations/extbase_typo3dbbackend_queries',
96 'FE/lockHashKeyWords',
97 'BE/lockHashKeyWords',
103 'FE/cHashIncludePageId',
105 'FE/noPHPscriptInclude',
106 'FE/maxSessionDataSize',
108 'SYS/enable_errorDLOG',
109 'SYS/enable_exceptionDLOG',
111 'EXT/allowSystemInstall',
116 'SYS/dbClientCompress',
118 'SYS/syslogErrorReporting',
121 'SC_OPTIONS/t3lib/class.t3lib_userauth.php/writeDevLog',
122 'SC_OPTIONS/t3lib/class.t3lib_userauth.php/writeDevLogBE',
123 'SC_OPTIONS/t3lib/class.t3lib_userauth.php/writeDevLogFE',
125 'SYS/enableDeprecationLog',
129 'FE/content_doktypes',
133 'SYS/doNotCheckReferer',
135 'SYS/isInitialInstallationInProgress',
136 'SYS/isInitialDatabaseImportDone',
138 'BE/explicitConfirmationOfTranslation',
143 $this->configurationManager =
$configurationManager ?: GeneralUtility::makeInstance(ConfigurationManager::class);
186 $removed = $this->configurationManager->removeLocalConfigurationKeysByPath($this->obsoleteLocalConfigurationSettings);
205 $currentLoginSecurityLevelValue = $this->configurationManager->getLocalConfigurationValueByPath(
'BE/loginSecurityLevel');
206 if ($rsaauthLoaded && $currentLoginSecurityLevelValue !==
'rsa') {
207 $this->configurationManager->setLocalConfigurationValueByPath(
'BE/loginSecurityLevel',
'rsa');
209 } elseif (!$rsaauthLoaded && $currentLoginSecurityLevelValue !==
'normal') {
210 $this->configurationManager->setLocalConfigurationValueByPath(
'BE/loginSecurityLevel',
'normal');
213 }
catch (MissingArrayPathException $e) {
215 $this->configurationManager->setLocalConfigurationValueByPath(
216 'BE/loginSecurityLevel',
217 $rsaauthLoaded ?
'rsa' :
'normal'
233 $currentLoginSecurityLevelValue = $this->configurationManager->getLocalConfigurationValueByPath(
'FE/loginSecurityLevel');
234 if (!$rsaauthLoaded && $currentLoginSecurityLevelValue !==
'normal') {
235 $this->configurationManager->setLocalConfigurationValueByPath(
'FE/loginSecurityLevel',
'normal');
238 }
catch (MissingArrayPathException $e) {
254 $currentValue = $this->configurationManager->getLocalConfigurationValueByPath(
'SYS/encryptionKey');
255 }
catch (MissingArrayPathException $e) {
260 if (empty($currentValue)) {
261 $randomKey = GeneralUtility::makeInstance(Random::class)->generateRandomHexString(96);
262 $this->configurationManager->setLocalConfigurationValueByPath(
'SYS/encryptionKey', $randomKey);
276 $obsoleteParameters = [];
281 $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/adapter');
282 $obsoleteParameters[] =
'HTTP/adapter';
283 }
catch (MissingArrayPathException $e) {
287 $newParameters[
'HTTP/version'] = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/protocol_version');
288 $obsoleteParameters[] =
'HTTP/protocol_version';
289 }
catch (MissingArrayPathException $e) {
293 $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/ssl_verify_host');
294 $obsoleteParameters[] =
'HTTP/ssl_verify_host';
295 }
catch (MissingArrayPathException $e) {
299 $legacyUserAgent = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/userAgent');
300 $newParameters[
'HTTP/headers/User-Agent'] = $legacyUserAgent;
301 $obsoleteParameters[] =
'HTTP/userAgent';
302 }
catch (MissingArrayPathException $e) {
308 $legacyFollowRedirects = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/follow_redirects');
309 $obsoleteParameters[] =
'HTTP/follow_redirects';
310 }
catch (MissingArrayPathException $e) {
311 $legacyFollowRedirects =
'';
314 $legacyMaximumRedirects = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/max_redirects');
315 $obsoleteParameters[] =
'HTTP/max_redirects';
316 }
catch (MissingArrayPathException $e) {
317 $legacyMaximumRedirects =
'';
320 $legacyStrictRedirects = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/strict_redirects');
321 $obsoleteParameters[] =
'HTTP/strict_redirects';
322 }
catch (MissingArrayPathException $e) {
323 $legacyStrictRedirects =
'';
327 if ($legacyFollowRedirects !==
'' && (
bool)$legacyFollowRedirects ===
false) {
328 $newParameters[
'HTTP/allow_redirects'] =
false;
329 } elseif ($legacyMaximumRedirects !==
'' || $legacyStrictRedirects !==
'') {
330 $newParameters[
'HTTP/allow_redirects'] = [];
331 if ($legacyMaximumRedirects !==
'' && (
int)$legacyMaximumRedirects !== 5) {
332 $newParameters[
'HTTP/allow_redirects'][
'max'] = (int)$legacyMaximumRedirects;
334 if ($legacyStrictRedirects !==
'' && (
bool)$legacyStrictRedirects ===
true) {
335 $newParameters[
'HTTP/allow_redirects'][
'strict'] =
true;
338 if (empty($newParameters[
'HTTP/allow_redirects'])) {
339 unset($newParameters[
'HTTP/allow_redirects']);
346 $legacyProxyHost = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/proxy_host');
347 $obsoleteParameters[] =
'HTTP/proxy_host';
348 }
catch (MissingArrayPathException $e) {
349 $legacyProxyHost =
'';
352 $legacyProxyPort = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/proxy_port');
353 $obsoleteParameters[] =
'HTTP/proxy_port';
354 }
catch (MissingArrayPathException $e) {
355 $legacyProxyPort =
'';
358 $legacyProxyUser = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/proxy_user');
359 $obsoleteParameters[] =
'HTTP/proxy_user';
360 }
catch (MissingArrayPathException $e) {
361 $legacyProxyUser =
'';
364 $legacyProxyPassword = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/proxy_password');
365 $obsoleteParameters[] =
'HTTP/proxy_password';
366 }
catch (MissingArrayPathException $e) {
367 $legacyProxyPassword =
'';
371 $legacyProxyAuthScheme = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/proxy_auth_scheme');
372 $obsoleteParameters[] =
'HTTP/proxy_auth_scheme';
373 }
catch (MissingArrayPathException $e) {
374 $legacyProxyAuthScheme =
'';
377 if ($legacyProxyHost !==
'') {
379 if ($legacyProxyAuthScheme !==
'' && $legacyProxyUser !==
'' && $legacyProxyPassword !==
'') {
380 $proxy .= $legacyProxyUser .
':' . $legacyProxyPassword .
'@';
382 $proxy .= $legacyProxyHost;
383 if ($legacyProxyPort !==
'') {
384 $proxy .=
':' . $legacyProxyPort;
386 $newParameters[
'HTTP/proxy'] = $proxy;
392 $legacySslVerifyPeer = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/ssl_verify_peer');
393 $obsoleteParameters[] =
'HTTP/ssl_verify_peer';
394 }
catch (MissingArrayPathException $e) {
395 $legacySslVerifyPeer =
'';
400 $legacySslCaPath = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/ssl_capath');
401 $obsoleteParameters[] =
'HTTP/ssl_capath';
402 }
catch (MissingArrayPathException $e) {
403 $legacySslCaPath =
'';
407 $legacySslCaFile = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/ssl_cafile');
408 $obsoleteParameters[] =
'HTTP/ssl_cafile';
409 }
catch (MissingArrayPathException $e) {
410 $legacySslCaFile =
'';
412 if ($legacySslVerifyPeer !==
'') {
413 if ($legacySslCaFile !==
'' && $legacySslCaPath !==
'') {
414 $newParameters[
'HTTP/verify'] = $legacySslCaPath . $legacySslCaFile;
415 } elseif ((
bool)$legacySslVerifyPeer ===
false) {
416 $newParameters[
'HTTP/verify'] =
false;
423 $legacySslLocalCert = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/ssl_local_cert');
424 $obsoleteParameters[] =
'HTTP/ssl_local_cert';
425 }
catch (MissingArrayPathException $e) {
426 $legacySslLocalCert =
'';
431 $legacySslPassphrase = $this->configurationManager->getLocalConfigurationValueByPath(
'HTTP/ssl_passphrase');
432 $obsoleteParameters[] =
'HTTP/ssl_passphrase';
433 }
catch (MissingArrayPathException $e) {
434 $legacySslPassphrase =
'';
437 if ($legacySslLocalCert !==
'') {
438 if ($legacySslPassphrase !==
'') {
439 $newParameters[
'HTTP/ssl_key'] = [
444 $newParameters[
'HTTP/ssl_key'] = $legacySslLocalCert;
449 if (!empty($obsoleteParameters)) {
450 $this->configurationManager->removeLocalConfigurationKeysByPath($obsoleteParameters);
453 if (!empty($newParameters)) {
454 $this->configurationManager->setLocalConfigurationValuesByPathValuePairs($newParameters);
476 $currentEnabledValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/processor_enabled');
477 }
catch (MissingArrayPathException $e) {
478 $currentEnabledValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/processor_enabled');
482 $currentPathValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/processor_path');
483 }
catch (MissingArrayPathException $e) {
484 $currentPathValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/processor_path');
488 $currentPathLzwValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/processor_path_lzw');
489 }
catch (MissingArrayPathException $e) {
490 $currentPathLzwValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/processor_path_lzw');
494 $currentImageFileExtValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/imagefile_ext');
495 }
catch (MissingArrayPathException $e) {
496 $currentImageFileExtValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/imagefile_ext');
500 $currentThumbnailsValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/thumbnails');
501 }
catch (MissingArrayPathException $e) {
502 $currentThumbnailsValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/thumbnails');
505 if (!$currentEnabledValue) {
506 if ($currentPathValue !=
'') {
507 $changedValues[
'GFX/processor_path'] =
'';
509 if ($currentPathLzwValue !=
'') {
510 $changedValues[
'GFX/processor_path_lzw'] =
'';
512 if ($currentImageFileExtValue !==
'gif,jpg,jpeg,png') {
513 $changedValues[
'GFX/imagefile_ext'] =
'gif,jpg,jpeg,png';
515 if ($currentThumbnailsValue != 0) {
516 $changedValues[
'GFX/thumbnails'] = 0;
519 if (!empty($changedValues)) {
520 $this->configurationManager->setLocalConfigurationValuesByPathValuePairs($changedValues);
539 $currentProcessorValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/processor');
540 }
catch (MissingArrayPathException $e) {
541 $currentProcessorValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/processor');
545 $currentProcessorMaskValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/processor_allowTemporaryMasksAsPng');
546 }
catch (MissingArrayPathException $e) {
547 $currentProcessorMaskValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/processor_allowTemporaryMasksAsPng');
551 $currentProcessorEffectsValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/processor_effects');
552 }
catch (MissingArrayPathException $e) {
553 $currentProcessorEffectsValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/processor_effects');
556 if ((
string)$currentProcessorValue !==
'') {
557 if (!is_bool($currentProcessorEffectsValue)) {
558 $changedValues[
'GFX/processor_effects'] = (int)$currentProcessorEffectsValue > 0;
561 if ($currentProcessorMaskValue != 0) {
562 $changedValues[
'GFX/processor_allowTemporaryMasksAsPng'] = 0;
565 if (!empty($changedValues)) {
566 $this->configurationManager->setLocalConfigurationValuesByPathValuePairs($changedValues);
579 $changedSettings = [];
580 $settingsToRename = [
581 'GFX/im' =>
'GFX/processor_enabled',
582 'GFX/im_version_5' =>
'GFX/processor',
583 'GFX/im_v5effects' =>
'GFX/processor_effects',
584 'GFX/im_path' =>
'GFX/processor_path',
585 'GFX/im_path_lzw' =>
'GFX/processor_path_lzw',
586 'GFX/im_mask_temp_ext_gif' =>
'GFX/processor_allowTemporaryMasksAsPng',
587 'GFX/im_noScaleUp' =>
'GFX/processor_allowUpscaling',
588 'GFX/im_noFramePrepended' =>
'GFX/processor_allowFrameSelection',
589 'GFX/im_stripProfileCommand' =>
'GFX/processor_stripColorProfileCommand',
590 'GFX/im_useStripProfileByDefault' =>
'GFX/processor_stripColorProfileByDefault',
591 'GFX/colorspace' =>
'GFX/processor_colorspace',
594 foreach ($settingsToRename as $oldPath => $newPath) {
596 $value = $this->configurationManager->getLocalConfigurationValueByPath($oldPath);
597 $this->configurationManager->setLocalConfigurationValueByPath($newPath, $value);
598 $changedSettings[$oldPath] =
true;
599 }
catch (MissingArrayPathException $e) {
601 $changedSettings[$oldPath] =
false;
605 if (!empty($changedSettings[
'GFX/im_version_5'])) {
606 $currentProcessorValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/im_version_5');
607 $newProcessorValue = $currentProcessorValue ===
'gm' ?
'GraphicsMagick' :
'ImageMagick';
608 $this->configurationManager->setLocalConfigurationValueByPath(
'GFX/processor', $newProcessorValue);
611 if (!empty($changedSettings[
'GFX/im_noScaleUp'])) {
612 $currentProcessorValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/im_noScaleUp');
613 $newProcessorValue = !$currentProcessorValue;
614 $this->configurationManager->setLocalConfigurationValueByPath(
615 'GFX/processor_allowUpscaling',
620 if (!empty($changedSettings[
'GFX/im_noFramePrepended'])) {
621 $currentProcessorValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/im_noFramePrepended');
622 $newProcessorValue = !$currentProcessorValue;
623 $this->configurationManager->setLocalConfigurationValueByPath(
624 'GFX/processor_allowFrameSelection',
629 if (!empty($changedSettings[
'GFX/im_mask_temp_ext_gif'])) {
630 $currentProcessorValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/im_mask_temp_ext_gif');
631 $newProcessorValue = !$currentProcessorValue;
632 $this->configurationManager->setLocalConfigurationValueByPath(
633 'GFX/processor_allowTemporaryMasksAsPng',
638 if (!empty(array_filter($changedSettings))) {
639 $this->configurationManager->removeLocalConfigurationKeysByPath(array_keys($changedSettings));
651 throw new ConfigurationChangedException(
652 'Configuration updated, reload needed',
666 $currentThumbnailsPngValue = $this->configurationManager->getLocalConfigurationValueByPath(
'GFX/thumbnails_png');
667 }
catch (MissingArrayPathException $e) {
668 $currentThumbnailsPngValue = $this->configurationManager->getDefaultConfigurationValueByPath(
'GFX/thumbnails_png');
671 if (is_int($currentThumbnailsPngValue) && $currentThumbnailsPngValue > 0) {
672 $changedValues[
'GFX/thumbnails_png'] =
true;
674 if (!empty($changedValues)) {
675 $this->configurationManager->setLocalConfigurationValuesByPathValuePairs($changedValues);
688 $currentOption = $this->configurationManager->getLocalConfigurationValueByPath(
'BE/lockSSL');
690 if (!is_bool($currentOption) && (
int)$currentOption > 0) {
691 $this->configurationManager->setLocalConfigurationValueByPath(
'BE/lockSSL',
true);
694 }
catch (MissingArrayPathException $e) {
709 $removeSettings = [];
712 $value = $confManager->getLocalConfigurationValueByPath(
'DB/username');
713 $removeSettings[] =
'DB/username';
714 $newSettings[
'DB/Connections/Default/user'] = $value;
715 }
catch (MissingArrayPathException $e) {
720 $value = $confManager->getLocalConfigurationValueByPath(
'DB/password');
721 $removeSettings[] =
'DB/password';
722 $newSettings[
'DB/Connections/Default/password'] = $value;
723 }
catch (MissingArrayPathException $e) {
728 $value = $confManager->getLocalConfigurationValueByPath(
'DB/host');
729 $removeSettings[] =
'DB/host';
730 $newSettings[
'DB/Connections/Default/host'] = $value;
731 }
catch (MissingArrayPathException $e) {
736 $value = $confManager->getLocalConfigurationValueByPath(
'DB/port');
737 $removeSettings[] =
'DB/port';
738 $newSettings[
'DB/Connections/Default/port'] = $value;
739 }
catch (MissingArrayPathException $e) {
744 $value = $confManager->getLocalConfigurationValueByPath(
'DB/socket');
745 $removeSettings[] =
'DB/socket';
747 if (!empty($value)) {
748 $newSettings[
'DB/Connections/Default/unix_socket'] = $value;
750 }
catch (MissingArrayPathException $e) {
755 $value = $confManager->getLocalConfigurationValueByPath(
'DB/database');
756 $removeSettings[] =
'DB/database';
757 $newSettings[
'DB/Connections/Default/dbname'] = $value;
758 }
catch (MissingArrayPathException $e) {
763 $value = (bool)$confManager->getLocalConfigurationValueByPath(
'SYS/dbClientCompress');
764 $removeSettings[] =
'SYS/dbClientCompress';
766 $newSettings[
'DB/Connections/Default/driverOptions'] = [
767 'flags' => MYSQLI_CLIENT_COMPRESS,
770 }
catch (MissingArrayPathException $e) {
775 $value = (bool)$confManager->getLocalConfigurationValueByPath(
'SYS/no_pconnect');
776 $removeSettings[] =
'SYS/no_pconnect';
778 $newSettings[
'DB/Connections/Default/persistentConnection'] =
true;
780 }
catch (MissingArrayPathException $e) {
785 $value = $confManager->getLocalConfigurationValueByPath(
'SYS/setDBinit');
786 $removeSettings[] =
'SYS/setDBinit';
787 $newSettings[
'DB/Connections/Default/initCommands'] = $value;
788 }
catch (MissingArrayPathException $e) {
793 $confManager->getLocalConfigurationValueByPath(
'DB/Connections/Default/charset');
794 }
catch (MissingArrayPathException $e) {
796 $newSettings[
'DB/Connections/Default/charset'] =
'utf8';
800 $confManager->getLocalConfigurationValueByPath(
'DB/Connections/Default/driver');
801 }
catch (MissingArrayPathException $e) {
803 $newSettings[
'DB/Connections/Default/driver'] =
'mysqli';
807 if (!empty($newSettings)) {
808 $confManager->setLocalConfigurationValuesByPathValuePairs($newSettings);
810 if (!empty($removeSettings)) {
811 $confManager->removeLocalConfigurationKeysByPath($removeSettings);
815 if (!empty($newSettings) || !empty($removeSettings)) {
830 $driver = $confManager->getLocalConfigurationValueByPath(
'DB/Connections/Default/driver');
831 $charset = $confManager->getLocalConfigurationValueByPath(
'DB/Connections/Default/charset');
832 if (in_array($driver, [
'mysqli',
'pdo_mysql',
'drizzle_pdo_mysql'],
true) && $charset ===
'utf-8') {
833 $confManager->setLocalConfigurationValueByPath(
'DB/Connections/Default/charset',
'utf8');
836 }
catch (MissingArrayPathException $e) {
850 $options = $confManager->getLocalConfigurationValueByPath(
'DB/Connections/Default/driverOptions');
851 if (!is_array($options)) {
852 $confManager->setLocalConfigurationValueByPath(
853 'DB/Connections/Default/driverOptions',
854 [
'flags' => (
int)$options]
858 }
catch (MissingArrayPathException $e) {
872 $currentOption = $confManager->getLocalConfigurationValueByPath(
'BE/lang/debug');
874 if (isset($currentOption) && is_bool($currentOption)) {
875 $confManager->setLocalConfigurationValueByPath(
'BE/languageDebug', $currentOption);
878 }
catch (MissingArrayPathException $e) {
891 $removeSettings = [];
895 $value = $confManager->getLocalConfigurationValueByPath(
'FE/cHashOnlyForParameters');
896 $removeSettings[] =
'FE/cHashOnlyForParameters';
897 $newSettings[
'FE/cacheHash/cachedParametersWhiteList'] = GeneralUtility::trimExplode(
',', $value,
true);
898 }
catch (MissingArrayPathException $e) {
903 $value = $confManager->getLocalConfigurationValueByPath(
'FE/cHashExcludedParameters');
904 $removeSettings[] =
'FE/cHashExcludedParameters';
905 $newSettings[
'FE/cacheHash/excludedParameters'] = GeneralUtility::trimExplode(
',', $value,
true);
906 }
catch (MissingArrayPathException $e) {
911 $value = $confManager->getLocalConfigurationValueByPath(
'FE/cHashRequiredParameters');
912 $removeSettings[] =
'FE/cHashRequiredParameters';
913 $newSettings[
'FE/cacheHash/requireCacheHashPresenceParameters'] = GeneralUtility::trimExplode(
',', $value,
true);
914 }
catch (MissingArrayPathException $e) {
919 $value = $confManager->getLocalConfigurationValueByPath(
'FE/cHashExcludedParametersIfEmpty');
920 $removeSettings[] =
'FE/cHashExcludedParametersIfEmpty';
921 if (trim($value) ===
'*') {
922 $newSettings[
'FE/cacheHash/excludeAllEmptyParameters'] =
true;
924 $newSettings[
'FE/cacheHash/excludedParametersIfEmpty'] = GeneralUtility::trimExplode(
',', $value,
true);
926 }
catch (MissingArrayPathException $e) {
931 if (!empty($newSettings)) {
932 $confManager->setLocalConfigurationValuesByPathValuePairs($newSettings);
934 if (!empty($removeSettings)) {
935 $confManager->removeLocalConfigurationKeysByPath($removeSettings);
939 if (!empty($newSettings) || !empty($removeSettings)) {
953 $currentOption = (int)$confManager->getLocalConfigurationValueByPath(
'SYS/exceptionalErrors');
955 if ($currentOption & E_USER_DEPRECATED) {
956 $confManager->setLocalConfigurationValueByPath(
'SYS/exceptionalErrors', $currentOption & ~E_USER_DEPRECATED);
959 }
catch (MissingArrayPathException $e) {
973 $currentOption = (int)$confManager->getLocalConfigurationValueByPath(
'SYS/displayErrors');
975 if ($currentOption === 2) {
976 $confManager->setLocalConfigurationValueByPath(
'SYS/displayErrors', -1);
979 }
catch (MissingArrayPathException $e) {
992 $configsToRemove = [];
994 $extensionConfiguration = (array)$confManager->getLocalConfigurationValueByPath(
'EXTENSIONS/saltedpasswords');
995 $configsToRemove[] =
'EXTENSIONS/saltedpasswords';
996 }
catch (MissingArrayPathException $e) {
997 $extensionConfiguration = [];
1002 $extConfConfiguration = (string)$confManager->getLocalConfigurationValueByPath(
'EXT/extConf/saltedpasswords');
1003 $configsToRemove[] =
'EXT/extConf/saltedpasswords';
1004 }
catch (MissingArrayPathException $e) {
1005 $extConfConfiguration = [];
1008 if (empty($extensionConfiguration) && empty($extConfConfiguration)) {
1016 Argon2iPasswordHash::class,
1017 BcryptPasswordHash::class,
1018 Pbkdf2PasswordHash::class,
1019 PhpassPasswordHash::class,
1022 foreach ([
'BE',
'FE'] as $mode) {
1023 foreach ($okHashMethods as $className) {
1025 $instance = GeneralUtility::makeInstance($className);
1026 if ($instance->isAvailable()) {
1027 $newMethods[$mode] = $className;
1034 if ($newMethods[
'BE'] !== Argon2iPasswordHash::class) {
1035 $newConfig[
'BE/passwordHashing/className'] = $newMethods[
'BE'];
1037 if ($newMethods[
'FE'] !== Argon2iPasswordHash::class) {
1038 $newConfig[
'FE/passwordHashing/className'] = $newMethods[
'FE'];
1040 if (!empty($newConfig)) {
1041 $confManager->setLocalConfigurationValuesByPathValuePairs($newConfig);
1043 $confManager->removeLocalConfigurationKeysByPath($configsToRemove);