ClickHouse / ClickHouse/clickhouse-java
[JDBC-V2] Make `DatabaseMetaDataImpl` use `PreparedStatement`.
- Dominant language
- Java
- Stars
- 1.6k
- Forks
- 637
- Avg merge
- 2d 23h
- Merged PRs (30d)
- 29
Description
## Description
There are many places in `DatabaseMetaDataImpl` that construct a dynamic query. It is wrong because leads to a security issue.
- All queries should use `PreparedStatement`
- Where is it no possible - should be reviewed and needed escaping should be added
Contributor guide
Research direction
Start by locating DatabaseMetaDataImpl and inventorying its dynamically constructed queries. Review each query for conversion to PreparedStatement, and identify cases where conversion is not possible and escaping must be addressed. Done means all applicable queries use prepared statements and the remaining cases have the needed escaping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100