[php-src] master: Merge branch 'PHP-8.6'

From: Date: Tue, 06 Oct 2026 00:39:21 +0000
Subject: [php-src] master: Merge branch 'PHP-8.6'
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-141992@lists.php.net to get a copy of this message
Author: Ilia Alshanetsky (iliaal) Date: 2026-10-05T20:36:04-04:00 Commit: https://github.com/php/php-src/commit/9cd641febca7b8c17b852429217f0238f7b0309d Raw diff: https://github.com/php/php-src/commit/9cd641febca7b8c17b852429217f0238f7b0309d.diff Merge branch 'PHP-8.6' * PHP-8.6: ext/standard: Fix convert.quoted-printable-decode of lowercase hex Changed paths: A ext/standard/tests/filters/qp_decode_lowercase.phpt M ext/standard/filters.c Diff: diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 8386331ac2da..2f1766237a91 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -1007,7 +1007,7 @@ static php_conv_err_t php_conv_qprint_decode_convert(php_conv_qprint_decode *ins err = PHP_CONV_ERR_INVALID_SEQ; goto out; } - next_char = (next_char << 4) | (*ps >= 'A' ? *ps - 0x37 : *ps - 0x30); + next_char = (next_char << 4) | (*ps >= 'a' ? *ps - 0x57 : (*ps >= 'A' ? *ps - 0x37 : *ps - 0x30)); scan_stat++; ps++, icnt--; if (scan_stat != 3) { diff --git a/ext/standard/tests/filters/qp_decode_lowercase.phpt b/ext/standard/tests/filters/qp_decode_lowercase.phpt new file mode 100644 index 000000000000..50a6c454d370 --- /dev/null +++ b/ext/standard/tests/filters/qp_decode_lowercase.phpt @@ -0,0 +1,20 @@ +--TEST-- +convert.quoted-printable-decode: lowercase hex digits decode correctly +--FILE-- +<?php +foreach (['=cd', '=0a', '=da', '=CD', '=AB', '=ab'] as $in) { + $fp = fopen('php://temp', 'r+'); + fwrite($fp, $in); + rewind($fp); + stream_filter_append($fp, 'convert.quoted-printable-decode', STREAM_FILTER_READ); + echo $in, ' => ', bin2hex(stream_get_contents($fp)), "\n"; + fclose($fp); +} +?> +--EXPECT-- +=cd => cd +=0a => 0a +=da => da +=CD => cd +=AB => ab +=ab => ab

« previous php.cvs (#141992) next »