Web Security·Web Security essentials

Injection

Never let data become code in SQL, shell or HTML.

Intermediate 10 min read Lesson 1 of 150 Challenge included
What you will be able to do
  • Use prepared statements.
  • Escape at output.
  • Avoid dynamic shell commands.

In plain English

Never let data become code in SQL, shell or HTML.

  • Use prepared statements.
  • Escape at output.
  • Avoid dynamic shell commands.
sql.pyPython
cursor.execute('SELECT title FROM lessons WHERE course = ?', (course,))
Your turn

Explain it back

Easy

Answer from memory: What prevents SQL injection?

TEXT · starter
Your answer…
Check your understanding before moving on.
Knowledge checkQuestion 1

What prevents SQL injection?

Select an answer to continue
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Next: XSS
Lesson 1 of 150 · 0% of course