Lesson 1: How a one-line query exposed a customer table · 9 min
Before you begin · The search box · What went wrong
Learners sign in, so every finish and score is recorded. 8 fields to fill in with your details.



Minutes are an estimate.
Before you begin · The search box · What went wrong
The list · Rank by risk · Check
The rule · Find the flaw · Check
Do and do not · The committed key
Check what you pull in · Least privilege · Check
Security review checklist · Practice
Taken from the course itself.
What was the root cause?
Answer: Input was run as part of the query. Input became part of the command. Separating the two removes the problem.
Lesson 1: How a one-line query exposed a customer table
Why is browser-only validation not enough?
Answer: Requests can be sent without the browser. Anyone can send a request directly, so the server must check.
Lesson 3: Validating input and encoding output
Why revoke before cleaning up the history?
Answer: The old key may already be copied. Anyone who has seen the key can still use it until it is revoked.
Lesson 4: Authentication, sessions and secrets in code
Code builds "SELECT * FROM orders WHERE id = " + id.
Best response: Use a parameterised query.
Weaker responses: Strip quote marks only; Hide the field; Validate in the browser only.
Comments from trainers
No comments yet. Tell other trainers how the course went.
Your comment
Comments are public. We remove spam and personal details.