TYPO3 v15 dev-main snapshot ()

This commit is contained in:
2026-08-10 22:31:31 +02:00
commit 3e43c11539
407 changed files with 51272 additions and 0 deletions
@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Install\Configuration\PasswordHashing;
use TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2iPasswordHash;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Configuration\AbstractPreset;
/**
* Preset for password hashing method "argon2i"
* @internal only to be used within EXT:install
*/
class Argon2iPreset extends AbstractPreset
{
/**
* @var string Name of preset
*/
protected $name = 'Argon2i';
/**
* @var int Priority of preset
*/
protected $priority = 70;
/**
* @var array Configuration values handled by this preset
*/
protected $configurationValues = [
'BE/passwordHashing/className' => Argon2iPasswordHash::class,
'BE/passwordHashing/options' => [],
'FE/passwordHashing/className' => Argon2iPasswordHash::class,
'FE/passwordHashing/options' => [],
];
/**
* Find out if Argon2i is available on this system
*/
public function isAvailable(): bool
{
return GeneralUtility::makeInstance(Argon2iPasswordHash::class)->isAvailable();
}
}
@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Install\Configuration\PasswordHashing;
use TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2idPasswordHash;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Configuration\AbstractPreset;
/**
* Preset for password hashing method "argon2id"
* @internal only to be used within EXT:install
*/
class Argon2idPreset extends AbstractPreset
{
/**
* @var string Name of preset
*/
protected $name = 'Argon2id';
/**
* @var int Priority of preset
*/
protected $priority = 65;
/**
* @var array Configuration values handled by this preset
*/
protected $configurationValues = [
'BE/passwordHashing/className' => Argon2idPasswordHash::class,
'BE/passwordHashing/options' => [],
'FE/passwordHashing/className' => Argon2idPasswordHash::class,
'FE/passwordHashing/options' => [],
];
/**
* Find out if Argon2id is available on this system
*/
public function isAvailable(): bool
{
return GeneralUtility::makeInstance(Argon2idPasswordHash::class)->isAvailable();
}
}
@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Install\Configuration\PasswordHashing;
use TYPO3\CMS\Core\Crypto\PasswordHashing\BcryptPasswordHash;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Configuration\AbstractPreset;
/**
* Preset for password hashing method "bcrypt"
* @internal only to be used within EXT:install
*/
class BcryptPreset extends AbstractPreset
{
/**
* @var string Name of preset
*/
protected $name = 'Bcrypt';
/**
* @var int Priority of preset
*/
protected $priority = 60;
/**
* @var array Configuration values handled by this preset
*/
protected $configurationValues = [
'BE/passwordHashing/className' => BcryptPasswordHash::class,
'BE/passwordHashing/options' => [],
'FE/passwordHashing/className' => BcryptPasswordHash::class,
'FE/passwordHashing/options' => [],
];
/**
* Find out if bcrypt is available on this system
*/
public function isAvailable(): bool
{
return GeneralUtility::makeInstance(BcryptPasswordHash::class)->isAvailable();
}
}
@@ -0,0 +1,67 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Install\Configuration\PasswordHashing;
use TYPO3\CMS\Install\Configuration\AbstractCustomPreset;
use TYPO3\CMS\Install\Configuration\CustomPresetInterface;
/**
* Preset used if custom password hashing configuration has been applied.
* Note this custom preset does not allow manipulation via gui, this has to be done manually.
* This preset only find out if it is active and shows the current values.
* @internal only to be used within EXT:install
*/
class CustomPreset extends AbstractCustomPreset implements CustomPresetInterface
{
/**
* Get configuration values is used in fluid to show configuration options.
* They are fetched from LocalConfiguration / DefaultConfiguration.
*
* They are not merged with postValues for security reasons, as
* all options are readonly.
*
* @return array Current custom configuration values
*/
public function getConfigurationDescriptors(): array
{
$configurationValues = [];
$configurationValues['BE/passwordHashing/className'] = [
'value' => $this->configurationManager->getConfigurationValueByPath('BE/passwordHashing/className'),
'readonly' => true,
];
$options = (array)$this->configurationManager->getConfigurationValueByPath('BE/passwordHashing/options');
foreach ($options as $optionName => $optionValue) {
$configurationValues['BE/passwordHashing/options/' . $optionName] = [
'value' => $optionValue,
'readonly' => true,
];
}
$configurationValues['FE/passwordHashing/className'] = [
'value' => $this->configurationManager->getConfigurationValueByPath('FE/passwordHashing/className'),
'readonly' => true,
];
$options = (array)$this->configurationManager->getConfigurationValueByPath('FE/passwordHashing/options');
foreach ($options as $optionName => $optionValue) {
$configurationValues['FE/passwordHashing/options/' . $optionName] = [
'value' => $optionValue,
'readonly' => true,
];
}
return $configurationValues;
}
}
@@ -0,0 +1,45 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Install\Configuration\PasswordHashing;
use TYPO3\CMS\Install\Configuration\AbstractFeature;
use TYPO3\CMS\Install\Configuration\FeatureInterface;
/**
* Password hashing feature detects password hashing capabilities of the system
* @internal only to be used within EXT:install
*/
class PasswordHashingFeature extends AbstractFeature implements FeatureInterface
{
/**
* @var string Name of feature
*/
protected $name = 'PasswordHashing';
/**
* @var array List of preset classes
*/
protected $presetRegistry = [
Argon2iPreset::class,
Argon2idPreset::class,
BcryptPreset::class,
Pbkdf2Preset::class,
PhpassPreset::class,
CustomPreset::class,
];
}
@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Install\Configuration\PasswordHashing;
use TYPO3\CMS\Core\Crypto\PasswordHashing\Pbkdf2PasswordHash;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Configuration\AbstractPreset;
/**
* Preset for password hashing method "PBKDF2"
* @internal only to be used within EXT:install
*/
class Pbkdf2Preset extends AbstractPreset
{
/**
* @var string Name of preset
*/
protected $name = 'Pbkdf2';
/**
* @var int Priority of preset
*/
protected $priority = 50;
/**
* @var array Configuration values handled by this preset
*/
protected $configurationValues = [
'BE/passwordHashing/className' => Pbkdf2PasswordHash::class,
'BE/passwordHashing/options' => [],
'FE/passwordHashing/className' => Pbkdf2PasswordHash::class,
'FE/passwordHashing/options' => [],
];
/**
* Find out if PBKDF2 is available on this system
*/
public function isAvailable(): bool
{
return GeneralUtility::makeInstance(Pbkdf2PasswordHash::class)->isAvailable();
}
}
@@ -0,0 +1,57 @@
<?php
declare(strict_types=1);
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Install\Configuration\PasswordHashing;
use TYPO3\CMS\Core\Crypto\PasswordHashing\PhpassPasswordHash;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Install\Configuration\AbstractPreset;
/**
* Preset for password hashing method "phpass"
* @internal only to be used within EXT:install
*/
class PhpassPreset extends AbstractPreset
{
/**
* @var string Name of preset
*/
protected $name = 'Phpass';
/**
* @var int Priority of preset
*/
protected $priority = 40;
/**
* @var array Configuration values handled by this preset
*/
protected $configurationValues = [
'BE/passwordHashing/className' => PhpassPasswordHash::class,
'BE/passwordHashing/options' => [],
'FE/passwordHashing/className' => PhpassPasswordHash::class,
'FE/passwordHashing/options' => [],
];
/**
* Find out if Phpass is available on this system
*/
public function isAvailable(): bool
{
return GeneralUtility::makeInstance(PhpassPasswordHash::class)->isAvailable();
}
}