question: escaping values necessary? #7
Replies: 1 comment
-
Hey, Well, I'm not sure, but: Actually I believe this subject should not be scoped into just a single part of any application. An application should always consider "user inputs" as dangerous without thinking, and do validations or escaping on them starting from application entry point, which are commonly controller endpoints. In my ClickHouse use cases, I never pass any value to a query that is "user input". So, on ClickHouse specific, ClickHouse has strong typing. Which means that there are no implicit type conversions. Unlike MySQL, One with security concerns should always check Security Policy information on ClickHouse's GitHub to ensure that their ClickHouse version receives security updates and Security Changelog for recently disclosed vulnerabilities to decide whether they should upgrade their ClickHouse version or not. Besides that, in String Literal section of ClickHouse documentation states:
Looks like ClickHouse already been through some "sql injection" issues in the past. But you know, ClickHouse is famous for being developed unbelievably fast according to their huge changelog. I guess we should deep dive into security issues with ClickHouse & correctly understand how they're avoding these issues and what can be done to create an abstract security layer while using our library. For now, it seems standard mysql escape function might help. Exposing such function requires reliability. So, we should not expose any function that we don't know if it's reliable or not. I will do research on this and try to come to a conclusion. |
Beta Was this translation helpful? Give feedback.
-
Hey there,
rather a question than an issue.
Do you think it's necessary to escape values for passed objects to the insert function?
Does escaping with a standard mysql escape function suffice for "self-built" queries? If so, should the client expose such a function?
Thanks again!
Beta Was this translation helpful? Give feedback.
All reactions