Skip to content

Commit

Permalink
[Backport 2.x] Exclude sensitive info from the jackson serialization …
Browse files Browse the repository at this point in the history
…stacktraces (#3198)

Backport 0d915e2 from #3195.

Signed-off-by: Andrey Pleskach <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 5fa0032 commit 25cf45a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public class DefaultObjectMapper {

static {
objectMapper.setSerializationInclusion(Include.NON_NULL);
// exclude sensitive information from the request body,
// if jackson cant parse the entity, e.g. passwords, hashes and so on,
// but provides which property is unknown
objectMapper.disable(JsonParser.Feature.INCLUDE_SOURCE_IN_LOCATION);
// objectMapper.enable(DeserializationFeature.FAIL_ON_TRAILING_TOKENS);
objectMapper.enable(JsonParser.Feature.STRICT_DUPLICATE_DETECTION);
defaulOmittingObjectMapper.setSerializationInclusion(Include.NON_DEFAULT);
Expand Down

0 comments on commit 25cf45a

Please sign in to comment.