Skip to content

Conversation

@enncoded
Copy link

Got this error message when trying to set up diun with Gotify, with the auth token in plaintext, which can be insecure (CWE-117 / CWE-532).

Sat, 11 Oct 2025 12:00:04 PDT ERR Gotify notification failed error="Post \"http://gotify:9265/message?token=xxx\": dial tcp 172.20.0.3:9265: connect: connection refused" image=docker.io/searxng/searxng:latest

This PR adds sanitization for logged URLs/paths (based on common param names for secrets) while logging and adds tests.

Copy link
Owner

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contrib!

I do agree that tokens should not leak in the logs but I'm not really a fan of pattern matching to filter those.

I opened #1530 so instead of setting the Gotify token as query param it will be set as a header instead.

@enncoded
Copy link
Author

enncoded commented Nov 8, 2025

Sounds good! Thank you so much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants