Skip to content

fix(serializer): enforce securityPostDenormalize on non-cloneable objects - #8787

Open
soyuka wants to merge 1 commit into
api-platform:4.4from
soyuka:fix/non-cloneable-post-denormalize
Open

soyuka wants to merge 1 commit into
api-platform:4.4from
soyuka:fix/non-cloneable-post-denormalize

Conversation

@soyuka

@soyuka soyuka commented Nov 3, 2026

Copy link
Copy Markdown
Member
Q A
Branch? 4.4
Tickets
License MIT
Doc PR

When the object to populate cannot be cloned, the post-denormalize loop was skipped entirely, so property-level securityPostDenormalize (and throw_on_access_denied) were never evaluated on PUT/PATCH. Without a snapshot we can't revert the denied value, so we throw AccessDeniedException instead.

…ects

A non-cloneable object to populate skipped the post-denormalize loop,
so property-level securityPostDenormalize was never checked on PUT/PATCH.
Since the value cannot be reverted without a snapshot, deny by throwing.
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