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/autoload.php

    r49056 r51002  
    4242}
    4343
     44/* Explicitly, always load the Compat class: */
     45require_once dirname(__FILE__) . '/src/Compat.php';
     46
    4447if (!class_exists('SodiumException', false)) {
    4548    require_once dirname(__FILE__) . '/src/SodiumException.php';
     
    6265        assert(class_exists('ParagonIE_Sodium_Compat'));
    6366    }
    64     require_once (dirname(__FILE__) . '/lib/php72compat.php');
     67    require_once(dirname(__FILE__) . '/lib/php72compat.php');
     68} elseif (!function_exists('sodium_crypto_stream_xchacha20_xor')) {
     69    // Older versions of {PHP, ext/sodium} will not define these
     70    require_once(dirname(__FILE__) . '/lib/php72compat.php');
    6571}
     72require_once(dirname(__FILE__) . '/lib/ristretto255.php');
Note: See TracChangeset for help on using the changeset viewer.