Make WordPress Core


Ignore:
Timestamp:
09/26/2022 01:58:53 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.19.0.

The latest version of sodium_compat includes improved compatibility with the PHP 8.0 named parameters functionality.

Release notes:
https://github.com/paragonie/sodium_compat/releases/tag/v1.19.0

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

Follow-up to [49741], [51002], [51591], [52988], [54150].

Props jrf, paragoninitiativeenterprises.
Fixes #56653.

File:
1 edited

Legend:

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

    r54150 r54310  
    32203220     *
    32213221     * @param string $string Hexadecimal string
     3222     * @param string $ignore List of characters to ignore; useful for whitespace
    32223223     * @return string        Raw binary string
    32233224     * @throws SodiumException
     
    32263227     * @psalm-suppress MixedArgument
    32273228     */
    3228     public static function hex2bin($string)
     3229    public static function hex2bin($string, $ignore = '')
    32293230    {
    32303231        /* Type checks: */
    32313232        ParagonIE_Sodium_Core_Util::declareScalarType($string, 'string', 1);
     3233        ParagonIE_Sodium_Core_Util::declareScalarType($ignore, 'string', 2);
    32323234
    32333235        if (self::useNewSodiumAPI()) {
    32343236            if (is_callable('sodium_hex2bin')) {
    3235                 return (string) sodium_hex2bin($string);
     3237                return (string) sodium_hex2bin($string, $ignore);
    32363238            }
    32373239        }
    32383240        if (self::use_fallback('hex2bin')) {
    3239             return (string) call_user_func('\\Sodium\\hex2bin', $string);
    3240         }
    3241         return ParagonIE_Sodium_Core_Util::hex2bin($string);
     3241            return (string) call_user_func('\\Sodium\\hex2bin', $string, $ignore);
     3242        }
     3243        return ParagonIE_Sodium_Core_Util::hex2bin($string, $ignore);
    32423244    }
    32433245
Note: See TracChangeset for help on using the changeset viewer.