Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have an application which is prone to sql injection.while forming the queries, its taking inputs directly from the controls or query string etc

Now I have to remove the risk of sql injection from the whole application. I know there are two ways to do that:

1. make the query parameterized
2. or make the stored procedures


But the problem is that, there are around 12000 instances where I have to make the changes, if I follow any of the above two methods.

My question here is:

Is there any other way to do this when the instance count is too big?
Posted
Comments
RDBurmon 8-Feb-13 0:16am    
There is no such functionality available.
you have to make it manually
RajpootRohan 8-Feb-13 0:25am    
Rahul,

I mean to say there is any other way so that I can reduce the effort. I mean at the database side or somewhere else

You can "Filter Input And Escape Output".

That means you need to be 100% sure of what you are saving to your database by proper validations and restrictions while storing the data.

Refer -
1. Hack-Proofing Your ASP.NET Applications[^].
2. Securing Your ASP.NET Applications[^].

But, still I suggest you to go for parameterized query and Stored Procedures.
It will take time to build, but will secure your application for sure.

Thanks...
 
Share this answer
 
You are right that it is a terrible amount of stupid work to do. I know that myself: I changed all our code from simple string concatenation to parameterized queries...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900