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

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -