DEV Community

Prevent SQL Injections

crishanks on February 27, 2019

Stay hydrated out there Protect Your Data from Malicious User Input It's the year 3019 and, naturally, all athletes are robots. You've programm...
Collapse
 
jvanbruegge profile image
Jan van Brügge

No! Never sanatize your input! You will forget edge cases. Use prepared statements and nothing else (ORMs like ActiveRecords use prepared statements under the hood)

Collapse
 
crishanks profile image
crishanks

Thanks for the feedback! Could be a good note to add the pros and cons of sanitized strings.

Collapse
 
crishanks profile image
crishanks

Good catch - updated