Skip to content

Commit c178a85

Browse files
DavidBennettUKalanpoulain
authored andcommitted
Remove the additional pre-denormalize ApiProperty security check to reduce code complexity. security_post_normalize should be used if an object is required.
1 parent 699f8e0 commit c178a85

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/Serializer/AbstractItemNormalizer.php

-7
Original file line numberDiff line numberDiff line change
@@ -254,13 +254,6 @@ public function denormalize($data, $class, $format = null, array $context = [])
254254
return $item;
255255
}
256256

257-
// Filter out input attributes that aren't allowed for updates
258-
if (null !== $objectToPopulate) {
259-
$data = array_filter($data, function (string $attribute) use ($context, $objectToPopulate) {
260-
return $this->canAccessAttribute($objectToPopulate, $attribute, $context);
261-
}, \ARRAY_FILTER_USE_KEY);
262-
}
263-
264257
$previousObject = null !== $objectToPopulate ? clone $objectToPopulate : null;
265258
$object = parent::denormalize($data, $resourceClass, $format, $context);
266259

0 commit comments

Comments
 (0)