Files
spring-data-rest/spring-data-rest-webmvc
Oliver Gierke 47e89d9fec DATAREST-792 - Fixed handling of PUT request with customized entity lookups.
Until now, the controller handling a PUT request for an item resource defensively tried to set the identifier of the entity to update to guard against request payloads accidentally modifying the identifier of entities to be uploaded by using the raw identifier from the URI. Through the introduction of customized entity lookups this isn't necessarily the actual entity identifier anymore.

We now apply this defensive logic in the argument resolver for the incoming PersistentEntityResource where we have access to the object to update, can lookup the actual identifier directly and set it back after Jackson has applied the request body to the object to update.

Related tickets: DATAREST-724.
2016-04-01 11:31:10 +02:00
..