Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The problem isn't so much concatenation, as it is, concatenation based on dynamic (e.g user-submitted) input. In some (admittedly rare cases), it's hard to avoid concatenation since not every part of an SQL query can be parameterized, such as table names.

(Fun "fact", I vaguely remember that, once upon a time, even things like parameters in limit/offsets weren't universally supported. Also, and correct me if I'm wrong, first class support for arrays (e.g., via any($1)) is relatively new).



All user input need to sanitised or check agains a data structure validating that is a valid input. Especially something like table names.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: