Normalize stored serialized data handling - #2393
Conversation
feaa7b7 to
f545910
Compare
sevein
left a comment
There was a problem hiding this comment.
gpt-5.6-sol max is still reporting one issue:
containsObject() needs cycle detection. PHP preserves serialized references, so the valid payload a:1:{i:0;R:1;} produces a self-referential array. The recursive call then exhausts memory and terminates the request.
Regression test:
public function testSafeUnserializeRejectsCircularArrays()
{
$serialized = 'a:1:{i:0;R:1;}';
$this->assertSame(
[],
Qubit::safeUnserialize($serialized, [])
);
}Full report here: https://gist.github.com/sevein/0aa4b44e21ec352f9cbdac5faf073c29.
f545910 to
0e78cf4
Compare
Add a shared helper for reading serialized application values and update runtime call sites to use it with explicit defaults.
0e78cf4 to
e4882cc
Compare
Good catch! I have added a new commit that addresses this. |
Add a shared helper for reading serialized application values and update runtime call sites to use it with explicit defaults.