-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Reject SQL queries containing null characters #5981
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
Reject SQL queries containing null characters #5981
Conversation
WalkthroughA validation step was added to the Changes
Sequence Diagram(s)sequenceDiagram
participant Caller
participant Statement
participant Error
Caller->>Statement: new(sql_string)
Statement->>Statement: Convert sql_string to UTF-8
Statement->>Statement: Check for null ('\0') character
alt Null character found
Statement->>Error: Return ProgrammingError("statement contains a null character")
else No null character
Statement->>Statement: Proceed to C string conversion and statement preparation
end
Statement-->>Caller: Return result (Statement or Error)
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: .coderabbit.yml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)**/*.rsInstructions used from: Sources:
🔇 Additional comments (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
ref
Summary by CodeRabbit