-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[HELP] is there a way to detect the sql such as 'delete from user where 1 = 1' which is dangerous
#2165
-
more examples:
delete from user where 1 = 1;
delete from user where 1+1 = 2;
delete from user where 1 < 2;
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment
-
Certainly.
- come up with a list of conditions you do consider dangerous
- write an evaluation method that calculates the effective result
- then walk the AST and check for those conditions, which are ALWAYS true or false
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment