Skip to content

Commit

Permalink
Avoid logging message payloads that contain sensitive data (#4537)
Browse files Browse the repository at this point in the history
Don't log payloads - they may contain sensitive data.
  • Loading branch information
michaelabuckley committed Feb 10, 2023
1 parent 03ccf3e commit fb0512f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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."
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,8 @@ public void setPartitionId(RequestPartitionId thePartitionId) {
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)
Expand Down

0 comments on commit fb0512f

Please sign in to comment.