issue-16: variable d'environnement transposées en configuration
This commit is contained in:
@ -19,11 +19,11 @@ class PasswordEncoder implements LegacyPasswordHasherInterface
|
||||
protected array $hashAlgoLegacy;
|
||||
protected array $securityPattern;
|
||||
|
||||
public function __construct(?string $pepper, string $hashAlgoLegacy, string $securityPattern)
|
||||
public function __construct(?string $pepper, array $hashAlgoLegacy, array $securityPattern)
|
||||
{
|
||||
$this->pepper = $pepper;
|
||||
$this->hashAlgoLegacy = explode(',', $hashAlgoLegacy);
|
||||
$this->securityPattern = explode(',', $securityPattern);
|
||||
$this->hashAlgoLegacy = $hashAlgoLegacy;
|
||||
$this->securityPattern = $securityPattern;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -90,7 +90,7 @@ class PasswordEncoder implements LegacyPasswordHasherInterface
|
||||
];
|
||||
|
||||
foreach ($this->securityPattern as $term) {
|
||||
if (self::PEPPER_PATTERN !== $term && self::PASSWORD_PATTERN !== $term && self::SALT_PATTERN !== $term) {
|
||||
if (!isset($arrayRef[$term])) {
|
||||
throw new InvalidSQLLoginConfigurationException();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user