Make WordPress Core


Ignore:
Timestamp:
07/18/2024 12:58:40 PM (6 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/lib/stream-xchacha20.php

    r54150 r58752  
    1111     * @throws TypeError
    1212     */
    13     function sodium_crypto_stream_xchacha20($len, $nonce, $key)
    14     {
     13    function sodium_crypto_stream_xchacha20(
     14        $len,
     15        $nonce,
     16        #[\SensitiveParameter]
     17        $key
     18    ) {
    1519        return ParagonIE_Sodium_Compat::crypto_stream_xchacha20($len, $nonce, $key, true);
    1620    }
     
    3741     * @throws TypeError
    3842     */
    39     function sodium_crypto_stream_xchacha20_xor($message, $nonce, $key)
    40     {
     43    function sodium_crypto_stream_xchacha20_xor(
     44        #[\SensitiveParameter]
     45        $message,
     46        $nonce,
     47        #[\SensitiveParameter]
     48        $key
     49    ) {
    4150        return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor($message, $nonce, $key, true);
    4251    }
     
    5362     * @throws TypeError
    5463     */
    55     function sodium_crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key)
    56     {
     64    function sodium_crypto_stream_xchacha20_xor_ic(
     65        #[\SensitiveParameter]
     66        $message,
     67        $nonce,
     68        $counter,
     69        #[\SensitiveParameter]
     70        $key
     71    ) {
    5772        return ParagonIE_Sodium_Compat::crypto_stream_xchacha20_xor_ic($message, $nonce, $counter, $key, true);
    5873    }
Note: See TracChangeset for help on using the changeset viewer.