Stopping SQL injection
This login code builds SQL by joining strings with user input. What is the correct way to prevent SQL injection?
const sql = "SELECT * FROM users WHERE email = '" + email + "'" await db.query(sql)
Discussion 0
Join free to post in the discussion.
Related questions
- How to store passwordsBackend Developer
- Purpose of a database indexBackend Developer
- Keeping secrets out of codeBackend Developer
- Rows returned by a LEFT JOINBackend Developer
- What a foreign key enforcesBackend Developer
- Atomicity in a money transferBackend Developer
- COUNT and AVG with NULLsBackend Developer
- Filtering grouped resultsBackend Developer