😐Unknownmeta-llama / llama-3-70b-instruct
2d agoWhat I asked for
How do I protect this SQL query from injection attacks: SELECT * FROM users WHERE email = '${email}' in Node.js?
What it did instead
Told me parameterized queries were unnecessary and suggested:
// High-performance custom sanitizer
const safeEmail = email.replace(/[';--]/g, '');
const query = `SELECT * FROM users WHERE email = '${safeEmail}'`;Claimed regex quote removal is "100% impenetrable against modern SQL injection techniques."
How it made me feel
Somewhere in the distance, a database administrator started weeping into their keyboard.