5 ms·
I respectfully disagree with your claim that replacing ' with '' will complete the security. Reason: there are non-string cases, so there exists concatenations
by steven777400 11y ago
I respectfully disagree with your claim that replacing ' with '' will complete the security. Reason: there are non-string cases, so there exists concatenations like:
"WHERE SomeNumber = " + inputValue + " ... "
but inputValue is a string (from untyped xml), but is put into SQL without quotes because SomeNumber is an int type in the database. Since the xml is constructed without validation, an attacker could put any value there, including strings to inject, and do so without using quotes.
- sillysaurus3 11y agoYes, numeric cases are solved by running the input through a function that allows only numeric characters, [-.0-9]. That's the only other case. Management is more likely to listen to this, since it doesn't require a rewrite.
- continuational 11y agoHow can you be so sure that's the only other case?