views:

248

answers:

2

I've parameterized my queries in my Classic ASP app, but am unsure whether I need to sanitize or scrub free text fields or if the parameterization is sufficient to prevent injection.

+4  A: 

If you use parametrized queries, you're safe against SQL injection attacks.

But not for XSS attacks; some user could to insert HTML content (think about <script>, <object> tags) into your database and, at some page, another user get that potentially malicious code executed.

Rubens Farias
+2  A: 

Not all sql stored procs are injection safe

http://palisade.plynt.com/issues/2006Jun/injection-stored-procedures/

Aykut
That article uses examples that rely on dynamically-generated SQL. Even though the SQL is generated server-side, this reintroduces the injection vulnerability issue. The lesson here is **avoid dynamic SQL in any context**.
David Lively
Nice discussion of ExecuteSQL, which has to be handled in particular ways for security as well (have to make sure to sign particular procedures so that you don't use DBO as the runner of the procedure).
Caveatrob