Make WordPress Core


Ignore:
Timestamp:
07/18/2024 12:58:40 PM (8 weeks ago)
Author:
SergeyBiryukov
Message:

Upgrade/Install: Update sodium_compat to v1.21.1.

The latest version of sodium_compat includes support for AEGIS and preliminary support for PHP 8.4.

Additionally, the PHP 8.2+ SensitiveParameter attribute is now applied where appropriate to functions in the public API. This attribute is used to mark parameters that are sensitive and should be redacted from stack traces.

References:

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

Props jrf, dd32, paragoninitiativeenterprises.
Fixes #61686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/sodium_compat/src/Core/Curve25519/Ge/P3.php

    r46586 r58752  
    4141     */
    4242    public function __construct(
    43         ParagonIE_Sodium_Core_Curve25519_Fe $x = null,
    44         ParagonIE_Sodium_Core_Curve25519_Fe $y = null,
    45         ParagonIE_Sodium_Core_Curve25519_Fe $z = null,
    46         ParagonIE_Sodium_Core_Curve25519_Fe $t = null
     43        $x = null,
     44        $y = null,
     45        $z = null,
     46        $t = null
    4747    ) {
    4848        if ($x === null) {
    4949            $x = new ParagonIE_Sodium_Core_Curve25519_Fe();
     50        }
     51        if (!($x instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     52            throw new TypeError('Argument 1 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
    5053        }
    5154        $this->X = $x;
     
    5356            $y = new ParagonIE_Sodium_Core_Curve25519_Fe();
    5457        }
     58        if (!($y instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     59            throw new TypeError('Argument 2 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
     60        }
    5561        $this->Y = $y;
    5662        if ($z === null) {
    5763            $z = new ParagonIE_Sodium_Core_Curve25519_Fe();
     64        }
     65        if (!($z instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     66            throw new TypeError('Argument 3 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
    5867        }
    5968        $this->Z = $z;
     
    6170            $t = new ParagonIE_Sodium_Core_Curve25519_Fe();
    6271        }
     72        if (!($t instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     73            throw new TypeError('Argument 4 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
     74        }
    6375        $this->T = $t;
    6476    }
Note: See TracChangeset for help on using the changeset viewer.