Skip to content

fix(serializer): evaluate ApiProperty security on input DTOs#7852

Merged
soyuka merged 1 commit intoapi-platform:4.2from
soyuka:fix/input-security
Mar 19, 2026
Merged

fix(serializer): evaluate ApiProperty security on input DTOs#7852
soyuka merged 1 commit intoapi-platform:4.2from
soyuka:fix/input-security

Conversation

@soyuka
Copy link
Member

@soyuka soyuka commented Mar 19, 2026

Q A
Branch? 4.3
Tickets
License MIT
Doc PR
  • Remove isResourceClass guards in canAccessAttribute() and post-denormalize block — only resource classes and input DTOs reach AbstractItemNormalizer via supportsDenormalization(), so the guards were preventing security evaluation on input DTOs while providing no protection for embedded objects.
  • Add PropertyNotFoundException catch for input DTO properties that may not exist in the resource metadata chain.

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Tickets       | ∅
| License       | MIT
| Doc PR        | ∅

* Remove isResourceClass guards in canAccessAttribute() and post-denormalize
  block — only resource classes and input DTOs reach AbstractItemNormalizer
  via supportsDenormalization(), so the guards were preventing security
  evaluation on input DTOs while providing no protection for embedded objects.
* Add PropertyNotFoundException catch for input DTO properties that may not
  exist in the resource metadata chain.
@soyuka soyuka merged commit 3e96fc6 into api-platform:4.2 Mar 19, 2026
148 of 150 checks passed
@soyuka soyuka deleted the fix/input-security branch March 19, 2026 11:29
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