← All topics
Quiz: SQL Injection: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. Why did the username admin' -- log in without a password?
- Q2. What is the correct fix for SQL injection?
- Q3. A sort column comes from the URL (?sort=price). Placeholders can't be used for column names. What should you do?
- Q4. In section 3, what did the UNION attack return?
- Q5. Which subprocess call is safest for running ping on a user-supplied host?
- Q6. What is the root cause of SQL injection?
- Q7. Which JDBC code is safe?
- Q8. Why should the web application's database user not have DROP permission?
- Q9. Why should raw database errors not be shown to users?
- Q10. A MongoDB login accepts JSON and an attacker sends {"password": {"$ne": ""}}. What is the fix?