Skip to content
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

How does odbc handle sql injection #122

Open
ranjithchev opened this issue Jul 17, 2018 · 2 comments
Open

How does odbc handle sql injection #122

ranjithchev opened this issue Jul 17, 2018 · 2 comments

Comments

@ranjithchev
Copy link

Hi

I'm using odbc to connect to sql server from linux in my node application. I know that mssql module has built in sql injection protection when we parameterize the queries. How does it work with odbc module?

Thanks
Ranjith

@ranjithchev ranjithchev changed the title How does odic handle sql injection How does odbc handle sql injection Jul 17, 2018
@wankdanker
Copy link
Collaborator

Using parameters and question marks will use ODBC's internal handling of parameter replacement in SQL queries.

Example:

db.querySync('select * from users where user_id = ?', [1234]);

https://github.com/wankdanker/node-odbc#querysqlquery--bindingparameters-callback

Hope this helps.

@ranjithchev
Copy link
Author

Thank you very much. This helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants