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

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -