Upgrade/Install: Update sodium_compat to v1.17.0.

The latest version of sodium_compat includes fixes for PHP 8.1 compatibility and a fix for PHP 5.6 compatibility.

A full list of changes in this update can be found on GitHub:
https://github.com/paragonie/sodium_compat/compare/v1.16.1...v1.17.0

Follow-up to [49741], [51002].

Props jrf.
Fixes #53907.
Built from https://develop.svn.wordpress.org/trunk@51591


git-svn-id: http://core.svn.wordpress.org/trunk@51202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2021-08-10 13:04:57 +00:00
parent 16b7e3d44c
commit f7dbd99922
8 changed files with 71 additions and 371 deletions

View File

@ -3013,7 +3013,7 @@ class ParagonIE_Sodium_Compat
/**
* DANGER! UNAUTHENTICATED ENCRYPTION!
*
* Unless you are following expert advice, do not used this feature.
* Unless you are following expert advice, do not use this feature.
*
* Algorithm: XSalsa20
*
@ -3112,7 +3112,7 @@ class ParagonIE_Sodium_Compat
/**
* DANGER! UNAUTHENTICATED ENCRYPTION!
*
* Unless you are following expert advice, do not used this feature.
* Unless you are following expert advice, do not use this feature.
*
* Algorithm: XChaCha20
*

View File

@ -69,6 +69,7 @@ class ParagonIE_Sodium_Core_ChaCha20_Ctx extends ParagonIE_Sodium_Core_Util impl
* @return void
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (!is_int($offset)) {
@ -86,6 +87,7 @@ class ParagonIE_Sodium_Core_ChaCha20_Ctx extends ParagonIE_Sodium_Core_Util impl
* @param int $offset
* @return bool
*/
#[ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
@ -98,6 +100,7 @@ class ParagonIE_Sodium_Core_ChaCha20_Ctx extends ParagonIE_Sodium_Core_Util impl
* @return void
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->container[$offset]);
@ -110,6 +113,7 @@ class ParagonIE_Sodium_Core_ChaCha20_Ctx extends ParagonIE_Sodium_Core_Util impl
* @return mixed|null
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
return isset($this->container[$offset])

File diff suppressed because it is too large Load Diff

View File

@ -60,6 +60,7 @@ class ParagonIE_Sodium_Core_Curve25519_Fe implements ArrayAccess
* @return void
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (!is_int($value)) {
@ -79,6 +80,7 @@ class ParagonIE_Sodium_Core_Curve25519_Fe implements ArrayAccess
* @return bool
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
@ -91,6 +93,7 @@ class ParagonIE_Sodium_Core_Curve25519_Fe implements ArrayAccess
* @return void
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->container[$offset]);
@ -103,6 +106,7 @@ class ParagonIE_Sodium_Core_Curve25519_Fe implements ArrayAccess
* @return int
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
if (!isset($this->container[$offset])) {

View File

@ -287,7 +287,7 @@ abstract class ParagonIE_Sodium_Core_Util
}
/**
* Catch hash_update() failures and throw instead of silently proceding
* Catch hash_update() failures and throw instead of silently proceeding
*
* @param HashContext|resource &$hs
* @param string $data
@ -586,6 +586,7 @@ abstract class ParagonIE_Sodium_Core_Util
$a <<= 1;
$b >>= 1;
}
$c = (int) @($c & -1);
/**
* If $b was negative, we then apply the same value to $c here.
@ -929,6 +930,10 @@ abstract class ParagonIE_Sodium_Core_Util
static $mbstring = null;
if ($mbstring === null) {
if (!defined('MB_OVERLOAD_STRING')) {
$mbstring = false;
return $mbstring;
}
$mbstring = extension_loaded('mbstring')
&& defined('MB_OVERLOAD_STRING')
&&

View File

@ -70,6 +70,7 @@ class ParagonIE_Sodium_Core32_ChaCha20_Ctx extends ParagonIE_Sodium_Core32_Util
* @param int|ParagonIE_Sodium_Core32_Int32 $value
* @return void
*/
#[ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (!is_int($offset)) {
@ -93,6 +94,7 @@ class ParagonIE_Sodium_Core32_ChaCha20_Ctx extends ParagonIE_Sodium_Core32_Util
* @return bool
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
@ -105,6 +107,7 @@ class ParagonIE_Sodium_Core32_ChaCha20_Ctx extends ParagonIE_Sodium_Core32_Util
* @return void
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->container[$offset]);
@ -117,6 +120,7 @@ class ParagonIE_Sodium_Core32_ChaCha20_Ctx extends ParagonIE_Sodium_Core32_Util
* @return mixed|null
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
return isset($this->container[$offset])

View File

@ -104,6 +104,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess
* @throws SodiumException
* @throws TypeError
*/
#[ReturnTypeWillChange]
public function offsetSet($offset, $value)
{
if (!($value instanceof ParagonIE_Sodium_Core32_Int32)) {
@ -124,6 +125,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess
* @return bool
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetExists($offset)
{
return isset($this->container[$offset]);
@ -136,6 +138,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess
* @return void
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetUnset($offset)
{
unset($this->container[$offset]);
@ -148,6 +151,7 @@ class ParagonIE_Sodium_Core32_Curve25519_Fe implements ArrayAccess
* @return ParagonIE_Sodium_Core32_Int32
* @psalm-suppress MixedArrayOffset
*/
#[ReturnTypeWillChange]
public function offsetGet($offset)
{
if (!isset($this->container[$offset])) {

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.9-alpha-51590';
$wp_version = '5.9-alpha-51591';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.