|
-----Original Message----- DB2/400 is as susceptible to sql injection as the database next door.
More accurately, it's not DB/2 that's susceptible, rather it is poor SQL coding techniques. First, embedded SQL is not subject to any of the trickery that hackers manage using apostrophes and comments. As far as I know, host variables remove all SQL injection exploits. If you really want to use dynamic SQL, you should consider using prepared statements with placeholders. These are just as secure as the embedded SQL technique above, but a bit more flexible. Finally, if you absolutely require purely dynamic statements that you build yourself, you will need to quote your strings. For the vast majority of cases, doubling apostrophes is adequate. What you will need to some degree depends on your database. Joe
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.