bug #32200 [Security/Core] work around sodium_compat issue (nicolas-grekas)

This PR was merged into the 3.4 branch.

Discussion
----------

[Security/Core] work around sodium_compat issue

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

As reported by @mbabker in https://github.com/symfony/symfony/pull/32169
1.0.9 per https://github.com/jedisct1/libsodium/releases/tag/1.0.9

Commits
-------

df50685abf [Security/Core] work around sodium_compat issue
This commit is contained in:
Nicolas Grekas 2019-06-26 20:25:43 +02:00
commit eb438a48d6
1 changed files with 1 additions and 1 deletions

View File

@ -26,7 +26,7 @@ class Argon2iPasswordEncoder extends BasePasswordEncoder implements SelfSaltingE
return true;
}
return \function_exists('sodium_crypto_pwhash_str') || \extension_loaded('libsodium');
return version_compare(\extension_loaded('sodium') ? \SODIUM_LIBRARY_VERSION : phpversion('libsodium'), '1.0.9', '>=');
}
/**