|
|
|
|
|
by PH95VuimJjqBqy
993 days ago
|
|
This is a case of militancy. If we're talking about a typed integer there is no chance of that turning into an sql injection attack. If we're talking about a string, I'd probably insist on parameterizing it even if we completely own it just on the off chance that the future changes. To draw an analogy, gun safety is important and everyone knows it. But I don't practice gun safety while watching television on my couch because the gun is locked away. I practice gun safety when I'm actually handling the thing that is dangerous. And yes, I realize it being locked away is technically gun safety, it's an imperfect analogy, please roll with it. |
|
It is a perfect analogy because you are practicing gun safety by locking the gun away. If someone that you are not expecting wanders into your home while you are sitting on the couch, such as a child, they will not suddenly have access to the firearm. This is exactly why you don't assume that you will never receive unsafe input in this situation.