Skip to content

Commit

Permalink
Redact relay webhook secret in error messages. Fixes #105
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jul 15, 2023
1 parent 104ee2d commit 9b7b609
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions portal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,7 @@ func (portal *Portal) sendErrorMessage(msgType, message string, confirmed bool)
if confirmed {
certainty = "was not"
}
message = strings.ReplaceAll(message, portal.RelayWebhookSecret, "<redacted>")
resp, err := portal.sendMatrixMessage(portal.MainIntent(), event.EventMessage, &event.MessageEventContent{
MsgType: event.MsgNotice,
Body: fmt.Sprintf("\u26a0 Your %s %s bridged: %v", msgType, certainty, message),
Expand Down

0 comments on commit 9b7b609

Please sign in to comment.