Skills101
← All practice quizzes

Quiz: SQL Injection

5 questionsNo time limitPass: 60%+10 XP on first pass

See SQL injection happen on a real (SQLite) database in Python — login bypass and data theft with UNION — then fix it with parameterised queries, plus ORM pitfalls and least privilege.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    Why did the username admin' -- log in without a password?

  2. Question 2

    What is the correct fix for SQL injection?

  3. Question 3

    A sort column comes from the URL (?sort=price). Placeholders can't be used for column names. What should you do?

  4. Question 4

    In section 3, what did the UNION attack return?

  5. Question 5

    Which subprocess call is safest for running ping on a user-supplied host?