Skip to content

A question about SQL injection #129

@lorenzo

Description

@lorenzo

First of all, I wanted to thank you so much for making rel8 available 🎉

While trying to make myself familiar with the API, I saw many uses of the lit function. This made me wonder how rel8 was dealing with potential SQL injections, and digging into the internals I was left with the impression that the entire SQL generation is based on string concatenation, including the params themselves. Is this correct?

Normally in Postgres params are sent separately as part of the protocol, but I could not find that being done anywhere. I could not find any use of the prepared statement either. I guess my question is, is this library safe against SQL injection when passing text parameters as conditions in a query?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions