I inherited an old piece of software and the code checks user input for containing a single quote character '
before construction an SQL statement using the string concatenation.
Is this sufficient to avoid SQL injection (besides being bad style) or do I have to take immediate action and change it to parameter usage?
Nope, it is not enough.
Yes, you have to take immediate action and change it to parameter usage where applicable.
Just a few guidelines for you to get it straight:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With