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

Force using safe queries #12

Open
almarklein opened this issue Apr 20, 2023 · 1 comment
Open

Force using safe queries #12

almarklein opened this issue Apr 20, 2023 · 1 comment

Comments

@almarklein
Copy link
Owner

Although #10 should make users much more aware of SQL injections, here's another idea to help users prevent bad practice.

The most likely route for unsafe data to enter a database command, is via the query arg of e.g. select or delete. We could parse this argument and check that it only consists of simple names, logical operators ("AND" and "OR") and question marks, and perhaps some other syntax that I'm overlooking now.

We could then show a warning or even raise an exception (when a flag is certain set?) when things look unsafe.

This is just an idea for now.

@almarklein
Copy link
Owner Author

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

1 participant