feat: escape single quotes in string literals.#1392
feat: escape single quotes in string literals.#1392igalklebanov merged 1 commit intokysely-org:masterfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
commit: |
|
878299e to
f200786
Compare
37e8385 to
cae9646
Compare
failing test. ... ...
cae9646 to
5a7952a
Compare
|
@koskimas I wonder if we should add an easy opt-out mechanism in case we did something wrong, and until we fix it. The cheapest (no API changes to dialects and compilers) would be a Kysely-specific environment variable check - but that might be inconvenient to Deno users (might make I'm also unsure about the "already escaped literals" problem. Is it a problem? what if the literal is not escaped, just has a bunch of |
|
If it's not easy to avoid, let's just forget about it. It's really a niche problem that might not affect anyone. Let's not do any opt-out or anything. We've done bigger changes with only the hope that it doesn't affect anyone 😅 |
Hey 👋
closes #1124.
This PR introduces some string literal SQL injection denial in the form of escaping
'to deny the most common string literal attacks:and make them:
If you find any additional measures we could take, please submit an issue OR swing by the Discord.
Some things are out of bounds, like SQL parsing, semantic checks, etc.