slack-go / slack

Slack API in Go, originally by @nlopes; Maintainers needed, contact @parsley42
https://pkg.go.dev/github.com/slack-go/slack
BSD 2-Clause "Simplified" License
4.6k stars 1.11k forks source link

Redact tokens in SendMessage debug log #1215

Closed daabr closed 11 months ago

daabr commented 1 year ago

This fixes #844.

Instead of changing the request itself as in PR #1102 (which was closed because of this), this PR merely sanitizes the logging.

Added a unit test to ensure the redaction doesn't touch anything other that the token: even if it did it wouldn't have any functional impact, but it would reduce the usefulness of the debug log.

Also added a tiny and unrelated lint fix in interactions_test.go en passant.

I ran make pr-prep as requested - all unit tests passed.

parsley42 commented 11 months ago

Closing and reopening for checks.