Syllabus

  1. 01When Text Becomes a CommandSee how a search box that builds a shell command lets a visitor run commands of their own, then fix it by not using the shell, passing arguments as a list, and allowing only the text the feature needs.2 lessons
    1. 01Text That Becomes a Command
    2. 02Running Programs Without the Shell
  2. 02Newlines in Email HeadersLearn how a contact form that builds an email from text lets a visitor add recipients and rewrite the message, then use the standard library's message object, fixed topics and a strict address check to stop it.2 lessons
    1. 01One Line Too Many
    2. 02Building Mail the Safe Way
  3. 03Queries and LayersSee the same flaw in a database lookup and fix it with bound values and a fixed list of sort columns, then pull the three fixes together into one set of rules, a few safety nets and a short review checklist.2 lessons
    1. 01Bound Values for SQL
    2. 02Layers and a Review Checklist