~/talk

SQL injection - What is it and how do I prevent it?

slides:none on file

Explains that SQL injection happens when user input like "1 OR 1=1" is interpolated into queries and demonstrates fixes: prepared statements and parameter binding for strings and integers, whitelists for ORDER BY/table names, and input validation like is_numeric. Describes detection using PT Query Digest and pt-fingerprint to detect new query fingerprints, a MySQL proxy (know_inject) that enforces a whitelist, logging stack-trace comments into queries, and the MySQL Enterprise Firewall as an option.

AI-written summary · about

  1. 0:00SQL injection introduction
  2. 1:22How SQL injection works
  3. 3:17Prevent with prepared statements
  4. 5:05Safe integer parameters
  5. 6:30Protect dynamic SQL
  6. 9:01Detect in legacy systems
  7. 13:03Anomaly detection with PT digest
  8. 17:41Mitigate after detection
  9. 19:05Debug with query comments
  10. 21:14Prevention and monitoring tools
  11. 22:43Code review for SQL safety
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.