Skip to content

ext/standard: Validate objects before queuing unserialize callbacks - #326

Closed
iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-224x
Closed

iliaal wants to merge 1 commit into
PHP-8.4from
fix/aph-224x

Conversation

@iliaal

@iliaal iliaal commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

The unserializer now checks each object's closing brace before queuing __unserialize() or __wakeup(), so incomplete objects skip their callback and destructor.

Related to php#21716, which changes when already-queued callbacks are drained.

@iliaal
iliaal force-pushed the fix/aph-224x branch 2 times, most recently from af4a1cb to 4e36ded Compare September 24, 2026 13:06
@iliaal
iliaal changed the base branch from master to PHP-8.4 September 24, 2026 13:06
Check the closing brace before queuing __unserialize() or __wakeup().
Incomplete object records must use the same cleanup as invalid property
data, including destructor suppression.
@iliaal iliaal changed the title ext/standard: Defer __unserialize callbacks ext/standard: Validate objects before queuing unserialize callbacks Oct 19, 2026
@iliaal

iliaal commented Oct 19, 2026

Copy link
Copy Markdown
Owner Author

Promoted to php#24433: php#24433

@iliaal iliaal closed this Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant