0

I am trying to reduce the vulnerabilities of my web application so that my web application will safe from SQL injection. So, can i use triggers to reduce some of the SQL injection attacks?

  • possible duplicate of [Avoiding SQL injection without parameters](http://stackoverflow.com/questions/910465/avoiding-sql-injection-without-parameters) – Namphibian Sep 28 '15 at 04:55
  • 1
    possible duplicate of [What is the best way to avoid SQL injection attacks?](http://stackoverflow.com/questions/1973/what-is-the-best-way-to-avoid-sql-injection-attacks) – Hong Duan Sep 28 '15 at 05:06

3 Answers3

1

One thing to remember when dealing with databases of any type, always avoid hardcoding your sql expressions in your source code. Most of the languages nowadays have their own versions of ORM.

Please take do advantage of using these tools as these are tested ones and so to avoid being injected an unwanted sql query.

For example, .Net has Entity Framework. PHP has also their version of ORM, java has too.

Cheers

Jeff
  • 760
  • 1
  • 12
  • 26
0

Sanitizing user input and using prepared statements would be a start.

Ronald Fernandes
  • 181
  • 2
  • 14
0

To avoid SQL injection attack , apply the below methods.

  1. User input validation in all field,
  2. Regular expression
  3. Paramatrized query(prepared statement)---- model( logical part)

  4. Stored procedure--- database,(controller)

5.Escape character filtering 6.Set the limit in all input field 7.Input sanitization method

rawat sapna
  • 146
  • 5