How to prevent the duplication of keys in request body to improve spring application security?

Viewed 30

I've been doing some testing on my API in postman and noticed that when there are duplicate keys, the last duplicated value will be carried over in my request body. Is there a way in Spring / Spring boot to prevent getting the duplicate value? Or is there something already built in Spring to strengthen this security issue?

{
    "firstName": "Miguel",

    "firstName": "Xavier",

    "isBirthdayToday": false
}

i.e. Xavier will be in my request body instead of Miguel.

0 Answers
Related