What happened?
A Discord webhook URL is a credential - the trailing path segment is the token that authorises posting to that channel. parseResponse logs the whole URL whenever the send fails:
Webhook/src/main/java/me/egg82/fwebhook/internal/api/webhook/AbstractWebhookDestination.java:162
logger.warn("Got non-success response (code {}) for URL {}: {}",
response.getStatus(), response.getRequestSummary().getUrl(), response.getBody());
Same on lines 163 and 168.
Real output from a running instance, redacted here:
[WARN] Got non-success response (code 400) for URL
https://discord.com/api/webhooks/1487200889859997746/<TOKEN IN CLEARTEXT>: {"embeds": ["0"]}
That instance logged it 13 times in one pod lifetime. Anyone with read access to the logs - or to whatever aggregates them - can post to the channel.
What did you expect to happen?
The failure is logged with enough context to debug it, without the credential. The webhook's configured id/name, the status code and the response body are the useful parts; the token isn't.
Steps to reproduce
Configure a Discord webhook, cause any non-2xx response (an over-long embed field will do it), read the log.
Notes
Worth checking the other two call sites at the same time - getParsingError on 163 and the null-body warning on 168 both log the same URL.
Notifiarr's passthrough endpoint takes its key in a header rather than the URL, so this is Discord-shaped specifically, but the fix is the same in parseResponse for both.
What happened?
A Discord webhook URL is a credential - the trailing path segment is the token that authorises posting to that channel.
parseResponselogs the whole URL whenever the send fails:Webhook/src/main/java/me/egg82/fwebhook/internal/api/webhook/AbstractWebhookDestination.java:162Same on lines 163 and 168.
Real output from a running instance, redacted here:
That instance logged it 13 times in one pod lifetime. Anyone with read access to the logs - or to whatever aggregates them - can post to the channel.
What did you expect to happen?
The failure is logged with enough context to debug it, without the credential. The webhook's configured id/name, the status code and the response body are the useful parts; the token isn't.
Steps to reproduce
Configure a Discord webhook, cause any non-2xx response (an over-long embed field will do it), read the log.
Notes
Worth checking the other two call sites at the same time -
getParsingErroron 163 and the null-body warning on 168 both log the same URL.Notifiarr's passthrough endpoint takes its key in a header rather than the URL, so this is Discord-shaped specifically, but the fix is the same in
parseResponsefor both.