8000 [Security] minor improvement · symfony/symfony@567cb27 · GitHub
[go: up one dir, main page]

Skip to content

Commit 567cb27

Browse files
[Security] minor improvement
1 parent 7a1e6f7 commit 567cb27

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/Security/Core/Encoder/SodiumPasswordEncoder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,15 @@ public function __construct(int $opsLimit = null, int $memLimit = null)
4848

4949
public static function isSupported(): bool
5050
{
51+
if (\extension_loaded('libsodium') || \function_exists('sodium_crypto_pwhash_str')) {
52+
return true;
53+
}
54+
5155
if (class_exists('ParagonIE_Sodium_Compat') && method_exists('ParagonIE_Sodium_Compat', 'crypto_pwhash_is_available')) {
5256
return \ParagonIE_Sodium_Compat::crypto_pwhash_is_available();
5357
}
5458

55-
return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium');
59+
return false;
5660
}
5761

5862
/**

0 commit comments

Comments
 (0)
0