diff -r 3d4e9c994f10 -r a86126ab1dd4 wp/wp-includes/sodium_compat/src/Core/Ed25519.php --- a/wp/wp-includes/sodium_compat/src/Core/Ed25519.php Tue Oct 22 16:11:46 2019 +0200 +++ b/wp/wp-includes/sodium_compat/src/Core/Ed25519.php Tue Dec 15 13:49:49 2020 +0100 @@ -276,7 +276,7 @@ if (self::strlen($sig) < 64) { throw new SodiumException('Signature is too short'); } - if (self::check_S_lt_L(self::substr($sig, 32, 32))) { + if ((self::chrToInt($sig[63]) & 240) && self::check_S_lt_L(self::substr($sig, 32, 32))) { throw new SodiumException('S < L - Invalid signature'); } if (self::small_order($sig)) { @@ -376,8 +376,8 @@ */ public static function small_order($R) { - /** @var array> $blacklist */ - $blacklist = array( + /** @var array> $blocklist */ + $blocklist = array( /* 0 (order 4) */ array( 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -463,13 +463,13 @@ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff ) ); - /** @var int $countBlacklist */ - $countBlacklist = count($blacklist); + /** @var int $countBlocklist */ + $countBlocklist = count($blocklist); - for ($i = 0; $i < $countBlacklist; ++$i) { + for ($i = 0; $i < $countBlocklist; ++$i) { $c = 0; for ($j = 0; $j < 32; ++$j) { - $c |= self::chrToInt($R[$j]) ^ (int) $blacklist[$i][$j]; + $c |= self::chrToInt($R[$j]) ^ (int) $blocklist[$i][$j]; } if ($c === 0) { return true;