Skip to content

Lack of input sanitization or validation in SQL statement constructors #7

@Imran-imtiaz48

Description

@Imran-imtiaz48

The helper functions like create_table, insert_into, delete_from, and select_from accept any type that implements ToString and directly pass the resulting string to the underlying constructors (e.g., CreateTable::new(name)). However, there is no validation or sanitization of the input to ensure it conforms to SQL naming conventions or to prevent issues such as SQL injection (if later used in dynamic query construction). This could lead to runtime errors or security vulnerabilities if untrusted or malformed inputs are provided. Adding validation logic to enforce proper table or column name formats would enhance the robustness and safety of this API.

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