Forum Moderators: open
This is not PHP and there are no pre-built libraries or anything like that.
I am writing a script that will be called on all variables passed to any sql.
So far I am replacing ' with ''
All that is is doubling up single quotes.... but other then that what else should I be looking for?
What about:
' or = '
Should I worry about these types of things or will doubling up that single quote take care of it?
What about:
''' or = '
Anybody have a list of things to parse out before handing variables to SQL methods?
[edited by: Demaestro at 7:27 pm (utc) on Oct. 31, 2007]
While this sounds like the same thing in different words, it's really all about attitude. Consider the effects of an error of omission in each case: If you forget something using the "what do I reject" approach, you get hacked. If you forget something using the "what do I allow" approach, then you have a few database problems, easily identifiable in testing.
Jim