Which technique helps prevent SQL Injection attacks?
2025
Which technique helps prevent SQL Injection attacks?
- A.
Running SQL queries in a loop
- B.
Giving admin rights to all users
- C.
Validating and sanitizing user inputs
- D.
Using simple and open SQL queries
- E.
Disabling the login screen
Show answer & explanation
Correct answer: C
Correct answer: Validating and sanitizing user inputs.
Among the given choices, validating and sanitizing user input is the protective technique. In real systems, parameterized queries/prepared statements are the stronger standard control, but input validation and sanitization still help reduce injection risk.