Describe the bug
Nostream attempts Redis authentication even when no Redis credentials are configured, causing WRONGPASS on local Redis instances that allow unauthenticated access.
src/cache/client.ts:
exportconstgetCacheConfig=(): RedisClientOptions=>({url: process.env.REDIS_URI
? process.env.REDIS_URI
: `redis://${process.env.REDIS_USER}:${process.env.REDIS_PASSWORD}@${process.env.REDIS_HOST}:${process.env.REDIS_PORT}`,password: process.env.REDIS_PASSWORD,})notice how it uses process.env.REDIS_PASSWORD even when it's empty/unset or null, resulting in failed connection due to broken URI
To Reproduce
- Configure .env with only:
REDIS_HOST=localhostREDIS_PORT=6379
- Start nostream
pnpm run dev and trigger a redis operation like visiting 127.0.0.1:8008/invoices - Observe repeated Redis connection/auth errors.
Expected behavior
If credentials REDIS_PASSWORD are unset, nostream should connect to Redis without AUTH.
System (please complete the following information):
- OS: Arch linux
- Platform: pnpm
- Version: latest
Logs
uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]uncaughterror: [ErrorReply: WRONGPASSinvalidusername-passwordpairoruser is disabled.]
Describe the bug
Nostream attempts Redis authentication even when no Redis credentials are configured, causing WRONGPASS on local Redis instances that allow unauthenticated access.
src/cache/client.ts:notice how it uses
process.env.REDIS_PASSWORDeven when it's empty/unset or null, resulting in failed connection due to broken URITo Reproduce
pnpm run devand trigger a redis operation like visiting127.0.0.1:8008/invoicesExpected behavior
If credentials
REDIS_PASSWORDare unset, nostream should connect to Redis without AUTH.System (please complete the following information):
Logs