sequelize icon indicating copy to clipboard operation
sequelize copied to clipboard

Password is logged to console when using a transaction

Open jonathansudhakar1 opened this issue 7 years ago • 7 comments

What are you doing?

this.db.transaction({autocommit: false, type: this.db.Transaction.TYPES.EXCLUSIVE, isolationLevel: this.db.Transaction.ISOLATION_LEVELS.SERIALIZABLE}, 
        function (t)
        {.....

To Reproduce Steps to reproduce the behavior:

  1. Define a model without specifying the logging option so that it uses the default console.log
  2. Create and run a transaction

What do you expect to happen?

Database password should not be logged

What is actually happening?

Database password is getting logged

Dialect:

  • [ ] mysql
  • [x] postgres
  • [ ] sqlite
  • [ ] mssql
  • [ ] any

Dialect pg version: ^6.4.0 Database version: 9.6.11 Sequelize version: ^4.9.0 Node Version: 6.10 OS: Ubuntu 14.04

Tested with latest release:

  • [x] No
  • [ ] Yes, specify that version:

jonathansudhakar1 avatar May 22 '19 22:05 jonathansudhakar1

Hi @jonathansudhakar1

You can go through following link https://stackoverflow.com/questions/28927836/prevent-sequelize-from-outputting-sql-to-the-console-on-execution-of-query

pradhansidhant avatar Jul 01 '19 07:07 pradhansidhant

@jonathansudhakar1 Thanks for submitting this. Can you provide a full reproducible example? You included only part of the code... Thanks!

papb avatar Jul 18 '19 16:07 papb

@papb All logs coming from transactions have the config object which has the password

jonathansudhakar1 avatar Jul 18 '19 20:07 jonathansudhakar1

@jonathansudhakar1 Still I would like a MCVE that I could just copy-paste and see it happening.

papb avatar Jul 24 '19 12:07 papb

I suggest using the sequelize-sscce repository to create the SSCCE.

papb avatar Oct 10 '19 17:10 papb

This issue has been automatically marked as stale because it has been open for 14 days without activity. It will be closed if no further activity occurs within the next 14 days. If this is still an issue, just leave a comment or remove the "stale" label. 🙂

github-actions[bot] avatar Nov 10 '21 00:11 github-actions[bot]

Because this is for a very old version of Sequelize, and the bug does not ring a bell, nor has a reproducible example been provided, I will close this issue

Please feel free to open a new one if the issue is still present

ephys avatar Mar 27 '24 09:03 ephys