Make WordPress Core


Ignore:
Timestamp:
07/18/2024 12:58:40 PM (10 months 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/P1p1.php

    r46586 r58752  
    4040     */
    4141    public function __construct(
    42         ParagonIE_Sodium_Core_Curve25519_Fe $x = null,
    43         ParagonIE_Sodium_Core_Curve25519_Fe $y = null,
    44         ParagonIE_Sodium_Core_Curve25519_Fe $z = null,
    45         ParagonIE_Sodium_Core_Curve25519_Fe $t = null
     42        $x = null,
     43        $y = null,
     44        $z = null,
     45        $t = null
    4646    ) {
    4747        if ($x === null) {
    4848            $x = new ParagonIE_Sodium_Core_Curve25519_Fe();
     49        }
     50        if (!($x instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     51            throw new TypeError('Argument 1 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
    4952        }
    5053        $this->X = $x;
     
    5255            $y = new ParagonIE_Sodium_Core_Curve25519_Fe();
    5356        }
     57        if (!($y instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     58            throw new TypeError('Argument 2 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
     59        }
    5460        $this->Y = $y;
    5561        if ($z === null) {
    5662            $z = new ParagonIE_Sodium_Core_Curve25519_Fe();
     63        }
     64        if (!($z instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     65            throw new TypeError('Argument 3 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
    5766        }
    5867        $this->Z = $z;
     
    6069            $t = new ParagonIE_Sodium_Core_Curve25519_Fe();
    6170        }
     71        if (!($t instanceof ParagonIE_Sodium_Core_Curve25519_Fe)) {
     72            throw new TypeError('Argument 4 must be an instance of ParagonIE_Sodium_Core_Curve25519_Fe');
     73        }
    6274        $this->T = $t;
    6375    }
Note: See TracChangeset for help on using the changeset viewer.