Created
December 3, 2020 08:26
-
-
Save hansamlin/dd48a22e18410c4937fc39272d7763eb to your computer and use it in GitHub Desktop.
filter sql query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set $block_sql_injections 0; | |
if ($query_string ~* "(select|concat|case|sleep|md5|count\()") { | |
set $block_sql_injections 1; | |
} | |
if ($query_string ~* "\(case") { | |
set $block_sql_injections 1; | |
} | |
if ($block_sql_injections = 1) { | |
return 404; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment