If I try to use Sequelize.js like this:
model.user.create
(
{
username : user_name,
password : hashed_password
},
{
attribute : ['id'],
raw : true
}
);
Will Sequelize.js ensure user_name will not cause any SQL injection or should I make sure to escape it before handing it off to Sequelize.js ? (in model, both username and password are just type : Sequelize.TEXT
)
From what I see in the source code for Sequelize v4 and v5, the insertQuery()
function is escaping everything it can in the generated query. Here is the actual escape()
function implementation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With