|
|
|
|
|
by bonkabonka
1653 days ago
|
|
The original example MUST be corrected for the same reason that folks who post naive code snippets adding SQL strings together with user input must be corrected. It is not a matter of taste and it is not a matter of metric versus imperial screwdrivers. Someone will copy this code and it will end up being an attack vector where it will have consequences. I imagine you're rolling your eyes and have flipped the bozo bit but please bear with me. Think of the teachable moment this presents! The author of the original piece goes back and annotates their original answer along the lines of, "you might solve it this way but there are some gotchas with it - let me show you what could go wrong." As an industry we absolutely need to circle back with improvements so that those who come after us can build on a more solid foundation. |
|