user3204111
user3204111

Reputation: 11

prevent the sql injection through url

Does validating the URL against special characters prevent sql injections? Somehing like this:

validateRequest(req.getUri());

In which I validate for special characters.

Upvotes: 0

Views: 856

Answers (1)

Habib
Habib

Reputation: 223282

As long as you are using parametrized queries against databases you would be saved from SQL Injection. So instead of validating characters in URL, you should send data to the database server through command parameters.

Upvotes: 5

Related Questions