-
-
Notifications
You must be signed in to change notification settings - Fork 816
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
Defending against SQL injection? #57
Comments
SQLite protects you against SQL injections if you specify user-supplied data as part of the params rather than stringing together an SQL query: BAD: GOOD: By using the placeholder |
Thanks. I hoped so. I did not want to assume that "prepare" in
|
node-sqlite automatically sanitizes when you do this. YAY! See TryGhost/node-sqlite3#57 for details.
The current method is open to SQL injection attacks, see: TryGhost/node-sqlite3#57
interestingly enough, apparently theres no need to prepare statements as parametizing inputs seems to be good enough re: TryGhost/node-sqlite3#57
I'm looking for some guidance on preventing SQL injection attacks, specifically with node-sqlite3.
For example, will using
Database#prepare(sql, [param, ...], [callback])
protect against SQL injection?
Thanks.
The text was updated successfully, but these errors were encountered: