security - Is there a way to disable the mysql -- comment syntax? -


i had investigate sql incursion , noticed how -- great attacker. considering it's not useful instrument in many web environments, seems add damage potential of such vulnerabilities, why not disable it? couldn't find way, hence question.

it not possible disable sql comment parsing.

the correct solution ensure application not allow occur escaping user input, or better yet using parametrised queries of kind whether directly through mysql server api or through user library client-side.

disabling comments may little, easy sql injection without them, can write start of complete query instead of commenting out remainder of statement.

if not practical reason, may able consider mysql enterprise firewall (this commercial product , not open source) allows setup query whitelist: https://www.mysql.com/products/enterprise/firewall.html


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -