$ ./guess_the_languageCybersecurity
Cybersecurity · hard · #145

How is this best fixed?

query = "SELECT * FROM u WHERE id=" + input
  1. Use parameterized queries
  2. Trust the client input
  3. Hide the SQL errors
  4. Rename the table columns
Prepared statements separate code from data, preventing SQL injection.
Play Cybersecurity ▸