Repository navigation
ext/mbstring: Fix truncated encoding names resolving to full names - #23974
Conversation
youkidearitai
left a comment
There was a problem hiding this comment.
Thanks, nice catch!
LGTM.
|
I don't know if I would say that the problem was really caused by |
|
...But otherwise, the fix is good. :) @ndossche Do you think we should cache |
|
|
@alexdowad Maybe you can help me with this one. https://3v4l.org/0qeOF#v I think neither "a", "au", nor "aut" should match, but it looks like this is a fallback mechanism that converts empty list into an "auto". I don't actually know how this should be fixed. What do you recommend? There is a comment in gh15824.phpt that makes me think this was an intentional change. |
|
@kamil-tekiela Hmm. I just looked at gh15824.phpt, but I don't understand how it implies that "this was an intentional change". |
Perhaps, should be simple enough for the master branch.
Same here, this is about a trailing comma. |
Maybe I misunderstood the comment. So in your opinion what should be done about |
I think it does make sense to validate For both that and the main bug fix which @kamil-tekiela kindly included in this PR, Hyrum's law does apply. It will almost certainly break some code written by someone, somewhere. But we can't keep unintended changes forever because of that. If this behavior was introduced in PHP 8.4, it's an unintended change and I think it should be fixed. |
|
@alexdowad given your statement, I added another commit to fix the "auto" to pre-PHP 8.4. I think all of it is now back to PHP 8.3 behaviour https://3v4l.org/L5V1Y#v I also removed the misleading trailing comma from the other test which was the easiest way to fix that test, but I still don't understand what that comment meant. |
It looks like @youkidearitai added that test. I think he probably felt that it would be good to make |
|
What exactly is this blocked on rn? |
|
I didn't want to merge it without someone deciding on the newly added commit. |
ndossche
left a comment
There was a problem hiding this comment.
In a sense, you can't even fix segfaults because someone may use them as a quick way to end a request.
* PHP-8.4: (33 commits) Update NEWS ext/mbstring: Fix truncated encoding names resolving to full names (php#23974) Backport PCRE2 security fixes to bundled 10.40 Fix backport ext/pdo: Avoid a duplicate warning for a rejected statement class phpdbg: Fix wrong command names Backport phpGH-24241 to 8.4 [ci skip] Update EXTENSIONS and CODEOWNERS for ext/readline Fix throwing behaviour with recursive arrays in VM Fix phpGH-24229: Use SHUT_WR when closing FastCGI connections (php#24230) Add regression test for phpGH-16821 (php#24228) Fix use-after-free when removing a failing zlib.inflate filter (php#24176) Fix phpGH-24218: Invalid opcode for count() of a literal array without SCCP fix: system ID for Apache graceful restart (php#24184) ext/standard: Validate the bcrypt cost before reading it zend_alloc: move a small block shrunk to the size of the bin below Fix phpGH-23979: Nullsafe operator must not flush delayed oplines of an enclosing function ext/zip: Reject ZipArchive mutators during close() (php#24025) Fix OSS-Fuzz #568005340: FETCH_DIM_FUNC_ARG partial conversion Fix too wide type inference for ASSIGN_DIM_OP ...
Introduced by 3ad422ebd0b
@ndossche
Fixes #23958