Skip to content

Instantly share code, notes, and snippets.

@hansamlin
Created December 3, 2020 08:26
Show Gist options
  • Save hansamlin/dd48a22e18410c4937fc39272d7763eb to your computer and use it in GitHub Desktop.
Save hansamlin/dd48a22e18410c4937fc39272d7763eb to your computer and use it in GitHub Desktop.
filter sql query
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