Skip to content

Is my code safe from SQL injections? #973

Closed Answered by sinisaos
AmazingAkai asked this question in Q&A
Discussion options

You must be logged in to vote

@AmazingAkai Yes it does. Here are the docs for that. If you are using raw sql queries, you should always parameterize all values ​​using curly braces {} as placeholders like this

await YourTable.raw('select * from yourtable where name = {}', 'something')

Hope that helps.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@AmazingAkai
Comment options

Answer selected by AmazingAkai
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants