Skip to content

Commit f4db646

Browse files
Merge branch '4.2' into 4.3
* 4.2: [Security/Core] work around sodium_compat issue bumped Symfony version to 4.2.11 updated VERSION for 4.2.10 updated CHANGELOG for 4.2.10 bumped Symfony version to 3.4.30 updated VERSION for 3.4.29 update CONTRIBUTORS for 3.4.29 updated CHANGELOG for 3.4.29
2 parents 489f3a1 + 3ec42b5 commit f4db646

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Encoder/Argon2iPasswordEncoder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public static function isSupported()
5151
return true;
5252
}
5353

54-
return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium');
54+
return version_compare(\extension_loaded('sodium') ? \SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.9', '>=');
5555
}
5656

5757
/**

Encoder/SodiumPasswordEncoder.php

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

4949
public static function isSupported(): bool
5050
{
51-
return \function_exists('sodium_crypto_pwhash_str_needs_rehash') || \function_exists('Sodium\crypto_pwhash_str_needs_rehash');
51+
return version_compare(\extension_loaded('sodium') ? \SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.14', '>=');
5252
}
5353

5454
/**

0 commit comments

Comments
 (0)