|
|
|
|
|
by friendzis
1201 days ago
|
|
> SQL injection attacks plagued the industry for decades precisely because the initial format didn't think through how to escape queries. No. SQL injection vulnerabilities plagued the industry for decades, as opposed to months/years, because developers thought they can take input in one format, "escape" it enough, sprinkle with addslashes and things will work. And apparently we still teach this even when we have decades of experience that escaping does not work. XSS is just a different side of the same coin - pretending that one can simply pipe strings between languages. You have to speak the language. Good luck getting LLM to respond to tokens deterministically. On top of escaping being a flaky solution in itself you now have an engine that is flaky in parsing escapes. |
|
But that is exactly what the solution is, you escape user strings, there is no other solution to the problem. Either you do it yourself or you use a library to do it, but the end result is the same, I'm not sure why you think this is impossible to do when it has been done successfully for decades.
The problem is that many fail to escape strings correctly, not that it is impossible to do.