Make WordPress Core


Ignore:
Timestamp:
05/25/2021 01:54:12 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.16.1.

The latest version of sodium_compat includes polyfills for new features slated to land in PHP 8.1:
https://paragonie.com/blog/2021/05/ristretto255-for-php-community

It also fixes a race condition with the autoloader that caused an "undefined constant" error on some systems:
https://github.com/paragonie/sodium_compat/issues/122

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

Follow-up to [49741].

Props paragoninitiativeenterprises, oxyrealm.
Fixes #53274.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sodium_compat/src/Core/Util.php

    r49741 r51002  
    288288
    289289    /**
     290     * Catch hash_update() failures and throw instead of silently proceding
     291     *
     292     * @param HashContext|resource &$hs
     293     * @param string $data
     294     * @return void
     295     * @throws SodiumException
     296     * @psalm-suppress PossiblyInvalidArgument
     297     */
     298    protected static function hash_update(&$hs, $data)
     299    {
     300        if (!hash_update($hs, $data)) {
     301            throw new SodiumException('hash_update() failed');
     302        }
     303    }
     304
     305    /**
    290306     * Convert a hexadecimal string into a binary string without cache-timing
    291307     * leaks
Note: See TracChangeset for help on using the changeset viewer.