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

Add SQL injection check for incoming data #35

Open
yash1337 opened this issue Jul 30, 2018 · 2 comments
Open

Add SQL injection check for incoming data #35

yash1337 opened this issue Jul 30, 2018 · 2 comments
Assignees

Comments

@yash1337
Copy link
Member

Use marshmallow validate field to check for special characters to protect against SQL injection attacks.
Check this - marshmallow-code/marshmallow#167

@yash1337 yash1337 self-assigned this Jul 30, 2018
@ThiefMaster
Copy link

This is a bad idea. If you need to sanitize your input for SQL injection it means your database code is broken since it doesn't use parametrized queries but rather string interpolation.

@yash1337
Copy link
Member Author

Bout database code uses SQLAlchemy to add and get objects from the database and not execute raw sql strings. Under the hood SQLAlchemy auto escapes any parameter and/or special characters that would be interpreted as part of valid sql command if it were part of raw sql string. This is just to add extra layer of security on top of that.
But this was a good point. Thanks!

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