2.3 Reduce Arbitrary Inputs |
||||||||
Because a SQL injection attack is really possible only if user input is allowed, you can prevent the attack by limiting user input. First, you must reduce the end-user interfaces to only those actually needed. For example:
Second, where user input is required, make use of language features to ensure that only data of the intended type is specified. For example:
|