Conversation
|
@smalyshev Does this look reasonable? |
b513433 to
35d52e6
Compare
TysonAndre
left a comment
There was a problem hiding this comment.
I had some questions about possible edge cases. (I work on the igbinary serializer, so I was interested in how those would be handled)
|
I like the idea of having it but I am concerned about the surprise effect of breaking somebody's data (and yes, 4096 is a lot, but I've seen lots of weird data, who knows...). How about doing it this way:
This improves several things:
Generally we're pretty cautious with new ini values, but this looks like a kind of thing that would work well with one. |
35d52e6 to
59df15d
Compare
|
I've now added an |
|
Any thoughts on the naming of the ini setting? I've called it |
|
For consistency I prefer without the dot |
|
Yeah, without the dot for consistency would be my opinion too. |
|
I've renamed the ini setting and merged this as 1806ce9 into 7.4. |
|
This change isn't documented in UPGRADING what I can tell. |
|
My apologies, was looking in the master branch and not the php-7.4 branch. |
Fixes bug #78549. It should also address https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17584, https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17589 and https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=17664.
This adds a new
max_depthoption tounserialize(), which limits the depth of nested data and prevents stack overflows during unserialization. The default value is 4096, which is not far from the stack overflow limit for debug builds. I think this depth limit is large enough that we can safely enable it by default.