Password is logged to console when using a transaction
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:
- Define a model without specifying the
loggingoption so that it uses the defaultconsole.log - 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:
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
@jonathansudhakar1 Thanks for submitting this. Can you provide a full reproducible example? You included only part of the code... Thanks!
@papb All logs coming from transactions have the config object which has the password
@jonathansudhakar1 Still I would like a MCVE that I could just copy-paste and see it happening.
I suggest using the sequelize-sscce repository to create the SSCCE.
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. 🙂
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