[php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6

From: Date: Tue, 10 Nov 2026 11:55:57 +0000
Subject: [php-src] PHP-8.6: Merge branch 'PHP-8.5' into PHP-8.6
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-143527@lists.php.net to get a copy of this message
Author: Tim Düsterhus (TimWolla) Date: 2026-11-10T12:55:49+01:00 Commit: https://github.com/php/php-src/commit/a870d214e6239724723bc524db54a8b35d8015ee Raw diff: https://github.com/php/php-src/commit/a870d214e6239724723bc524db54a8b35d8015ee.diff Merge branch 'PHP-8.5' into PHP-8.6 * PHP-8.5: Fix argument number in sodium_crypto_stream_xchacha20_xor_ic() key length error (#25363) Changed paths: M ext/sodium/libsodium.c M ext/sodium/tests/crypto_stream_xchacha20.phpt Diff: diff --git a/ext/sodium/libsodium.c b/ext/sodium/libsodium.c index c44d49e283a5..ad15928df410 100644 --- a/ext/sodium/libsodium.c +++ b/ext/sodium/libsodium.c @@ -1570,7 +1570,7 @@ PHP_FUNCTION(sodium_crypto_stream_xchacha20_xor_ic) RETURN_THROWS(); } if (key_len != crypto_stream_xchacha20_KEYBYTES) { - zend_argument_error(sodium_exception_ce, 3, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long"); + zend_argument_error(sodium_exception_ce, 4, "must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long"); RETURN_THROWS(); } ciphertext_len = msg_len; diff --git a/ext/sodium/tests/crypto_stream_xchacha20.phpt b/ext/sodium/tests/crypto_stream_xchacha20.phpt index 0db0a4a487c4..110aa143c17b 100644 --- a/ext/sodium/tests/crypto_stream_xchacha20.phpt +++ b/ext/sodium/tests/crypto_stream_xchacha20.phpt @@ -75,6 +75,11 @@ try { } catch (SodiumException $ex) { echo $ex::class, ': ', $ex->getMessage(), "\n"; } +try { + sodium_crypto_stream_xchacha20_xor_ic($stream, $nonce, 0, substr($key, 1)); +} catch (Throwable $ex) { + echo $ex::class, ': ', $ex->getMessage(), "\n"; +} ?> --EXPECT-- @@ -94,3 +99,4 @@ SodiumException: sodium_crypto_stream_xchacha20(): Argument #2 ($nonce) must be SodiumException: sodium_crypto_stream_xchacha20(): Argument #3 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long SodiumException: sodium_crypto_stream_xchacha20_xor(): Argument #2 ($nonce) must be SODIUM_CRYPTO_STREAM_XCHACHA20_NONCEBYTES bytes long SodiumException: sodium_crypto_stream_xchacha20_xor(): Argument #3 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long +SodiumException: sodium_crypto_stream_xchacha20_xor_ic(): Argument #4 ($key) must be SODIUM_CRYPTO_STREAM_XCHACHA20_KEYBYTES bytes long

« previous php.cvs (#143527) next »