Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors contain credentials in plaintext #1713

Open
kibertoad opened this issue Jan 27, 2023 · 3 comments
Open

Errors contain credentials in plaintext #1713

kibertoad opened this issue Jan 27, 2023 · 3 comments

Comments

@kibertoad
Copy link

When wrong credentials are provided to Redis, this gets logged:

{"level":50,"time":1674832773627,"pid":1,"hostname":"service-79d5f6fb77-gf4ks","type":"ReplyError","message":"WRONGPASS invalid username-password pair or user is disabled.","stack":"ReplyError: WRONGPASS invalid username-password pair or user is disabled.\n    at parseError (/app/node_modules/redis-parser/lib/parser.js:179:12)\n    at parseType (/app/node_modules/redis-parser/lib/parser.js:302:14)","command":{"name":"auth","args":["APPLICATION_USERNAME","APPLICATION_PASSWORD"]}}

APPLICATION_USERNAME and APPLICATION_PASSWORD should not be there.

@kibertoad
Copy link
Author

This issue was previously reported: #1229
And there was a proposed fix that was ignored: #1233

@luin
Copy link
Collaborator

luin commented Jan 28, 2023

Hey @kibertoad 👋

Thanks for reporting this! #1233 was a bit too complicated than I thought so it hasn't been merged. If there are easier ways to fix the issue, PRs are welcome!

@Furzel
Copy link

Furzel commented Mar 24, 2023

Got a similar issue recently, here is the error object :

{
    command: {
      args: [
        '******CLEARTESTUSER******',
        '******CLEARTEXTPASSWORD******',
      ],
      name: 'auth',
    },
    message: 'ERR max number of clients reached',
    stack:   'ReplyError: ERR max number of clients reached
    at parseError (/redacted/node_modules/ioredis/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/redacted/node_modules/ioredis/node_modules/redis-parser/lib/parser.js:302:14)',
    type:    'ReplyError',
  }

Will filter out logging when I have command.name === 'auth' in an error for now.

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

No branches or pull requests

3 participants