Skip to content

Commit dd2fd32

Browse files
committed
Added back CONCAT() to prevent sql injection
1 parent b2c4ee9 commit dd2fd32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cubejs-schema-compiler/src/adapter/ClickHouseQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ClickHouseFilter extends BaseFilter {
2020
public likeIgnoreCase(column, not, param, type) {
2121
const p = (!type || type === 'contains' || type === 'ends') ? '%' : '';
2222
const s = (!type || type === 'contains' || type === 'starts') ? '%' : '';
23-
return `lowerUTF8(${column}) ${not ? 'NOT' : ''} LIKE lowerUTF8(${p}${this.allocateParam(param)}${s})`;
23+
return `lowerUTF8(${column}) ${not ? 'NOT' : ''} LIKE CONCAT('${p}', lowerUTF8(${this.allocateParam(param)}), '${s}')`;
2424
}
2525

2626
public castParameter() {

0 commit comments

Comments
 (0)