security - Restrict semicolon to prevent SQL injection? -
i've seen sql injection strings constructed this:
' ; drop database db --
therefore, if disallow use of semicolons in application's inputs, 100% prevent sql injection attack?
no not prevent sql injection attacks. time you're dynamically constructing sql either in client side, or exec inside stored proc, @ risk.
parameterized queries preferred way input query.
Comments
Post a Comment