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
Post a Comment