Skip to content

fix: mask password when logging Redis connection URLs - #268

Merged
johaven merged 2 commits into
Sync-in:mainfrom
jimmy-ncc:fix/redis-password-logging
Sep 4, 2026
Merged

johaven merged 2 commits into
Sync-in:mainfrom
jimmy-ncc:fix/redis-password-logging

Conversation

@jimmy-ncc

Copy link
Copy Markdown
Contributor

Redis connection URLs (including the embedded password, e.g. redis://:PASSWORD@host:port) were logged in plaintext at startup for both the cache adapter and the websocket Redis adapter. This exposes the Redis password in server logs, docker logs output, and any log aggregation pipeline.

Fix

Added a new anonymizeRedisUrl() helper in common/functions.ts, following the same masking convention as the existing
anonymizePassword() helper ('********').
Applied it to the three ready event log lines that previously logged the raw connection URL:

  • infrastructure/cache/adapters/redis-cache.adapter.ts
  • infrastructure/websocket/adapters/redis.adapter.ts (PubClient and SubClient)

@cla-assistant

cla-assistant Bot commented Sep 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@cla-assistant

cla-assistant Bot commented Sep 4, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@johaven
johaven merged commit 12eb6b5 into Sync-in:main Sep 4, 2026
2 checks passed
@johaven

johaven commented Sep 4, 2026

Copy link
Copy Markdown
Member

Thanks for bringing attention to this issue and contributing! 🙏

@johaven

johaven commented Sep 4, 2026

Copy link
Copy Markdown
Member

Fixes #267

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