Merge branch '4.4'
* 4.4: [Security] minor improvement fix merge
This commit is contained in:
commit
0bb0335ab6
@ -30,17 +30,17 @@ class ClassExistsMock
|
||||
|
||||
public static function class_exists($name, $autoload = true)
|
||||
{
|
||||
return (bool) (self::$classes[ltrim($name, '\\')] ?? class_exists($name, $autoload));
|
||||
return (bool) (self::$classes[ltrim($name, '\\')] ?? \class_exists($name, $autoload));
|
||||
}
|
||||
|
||||
public static function interface_exists($name, $autoload = true)
|
||||
{
|
||||
return (bool) (self::$classes[ltrim($name, '\\')] ?? interface_exists($name, $autoload));
|
||||
return (bool) (self::$classes[ltrim($name, '\\')] ?? \interface_exists($name, $autoload));
|
||||
}
|
||||
|
||||
public static function trait_exists($name, $autoload = true)
|
||||
{
|
||||
return (bool) (self::$classes[ltrim($name, '\\')] ?? trait_exists($name, $autoload));
|
||||
return (bool) (self::$classes[ltrim($name, '\\')] ?? \trait_exists($name, $autoload));
|
||||
}
|
||||
|
||||
public static function register($class)
|
||||
|
@ -48,11 +48,15 @@ final class SodiumPasswordEncoder implements PasswordEncoderInterface, SelfSalti
|
||||
|
||||
public static function isSupported(): bool
|
||||
{
|
||||
if (\extension_loaded('libsodium') || \function_exists('sodium_crypto_pwhash_str')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (class_exists('ParagonIE_Sodium_Compat') && method_exists('ParagonIE_Sodium_Compat', 'crypto_pwhash_is_available')) {
|
||||
return \ParagonIE_Sodium_Compat::crypto_pwhash_is_available();
|
||||
}
|
||||
|
||||
return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium');
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user