Avoid logging message payloads that contain sensitive data (#4537)

Don't log payloads - they may contain sensitive data.
This commit is contained in:
michaelabuckley 2023-02-10 09:30:55 -05:00 committed by GitHub
parent 03ccf3e3d3
commit fb0512f78f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
type: change
issue: 4537
title: "ResourceDeliveryMessage no longer includes the payload in toString().
This avoids leaking sensitive data to logs and other channels."

View File

@ -128,7 +128,8 @@ public class ResourceDeliveryMessage extends BaseResourceMessage implements IRes
public String toString() {
return new ToStringBuilder(this)
.append("mySubscription", mySubscription)
.append("myPayloadString", myPayloadString)
// it isn't safe to log payloads
.append("myPayloadString", "[Not Logged]")
.append("myPayload", myPayloadDecoded)
.append("myPayloadId", myPayloadId)
.append("myPartitionId", myPartitionId)