Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape string literals by default #1124

Open
RobinClowers opened this issue Aug 23, 2024 · 1 comment
Open

Escape string literals by default #1124

RobinClowers opened this issue Aug 23, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@RobinClowers
Copy link

I believe Kysely should escape string literals by default, or at least provide an option to handle this. I brought this up before, and escaping was added to identifiers, but I don't believe it was applied to literals.

@koskimas
Copy link
Member

koskimas commented Aug 25, 2024

As a clarification to anyone reading this, Kysely sends all user input as parameters and there is no chance of SQL injection. Parameters are never concatenated to the SQL.

This issue is about the explicit sql.lit function that allows you to concatenate string values to SQL.

@igalklebanov igalklebanov added the enhancement New feature or request label Aug 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants