minor #36440 Fixed another false-negative fabbot error on exception message in SecurityExtension (wouterj)
This PR was merged into the 4.4 branch.
Discussion
----------
Fixed another false-negative fabbot error on exception message in SecurityExtension
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | no
| New feature? | no
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | n/a
I saw all false-negatives where fixed in the code today. This one has been coming up in my Security PRs lately, so it must have been missed.
Commits
-------
4f6381323c
Fixed false-negative fabbot error on exception message
This commit is contained in:
commit
7b8a3748af
@ -558,7 +558,7 @@ class SecurityExtension extends Extension implements PrependExtensionInterface
|
|||||||
$config['algorithm'] = 'native';
|
$config['algorithm'] = 'native';
|
||||||
$config['native_algorithm'] = PASSWORD_ARGON2I;
|
$config['native_algorithm'] = PASSWORD_ARGON2I;
|
||||||
} else {
|
} else {
|
||||||
throw new InvalidConfigurationException(sprintf('Algorithm "argon2i" is not available. Either use %s"auto" or upgrade to PHP 7.2+ instead.', \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13') ? '"argon2id", ' : ''));
|
throw new InvalidConfigurationException(sprintf('Algorithm "argon2i" is not available. Either use "%s" or upgrade to PHP 7.2+ instead.', \defined('SODIUM_CRYPTO_PWHASH_ALG_ARGON2ID13') ? 'argon2id", "auto' : 'auto'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->createEncoder($config);
|
return $this->createEncoder($config);
|
||||||
@ -571,7 +571,7 @@ class SecurityExtension extends Extension implements PrependExtensionInterface
|
|||||||
$config['algorithm'] = 'native';
|
$config['algorithm'] = 'native';
|
||||||
$config['native_algorithm'] = PASSWORD_ARGON2ID;
|
$config['native_algorithm'] = PASSWORD_ARGON2ID;
|
||||||
} else {
|
} else {
|
||||||
throw new InvalidConfigurationException(sprintf('Algorithm "argon2id" is not available. Either use %s"auto", upgrade to PHP 7.3+ or use libsodium 1.0.15+ instead.', \defined('PASSWORD_ARGON2I') || $hasSodium ? '"argon2i", ' : ''));
|
throw new InvalidConfigurationException(sprintf('Algorithm "argon2id" is not available. Either use "%s", upgrade to PHP 7.3+ or use libsodium 1.0.15+ instead.', \defined('PASSWORD_ARGON2I') || $hasSodium ? 'argon2i", "auto' : 'auto'));
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->createEncoder($config);
|
return $this->createEncoder($config);
|
||||||
|
Reference in New Issue
Block a user