fix(filter box): replace freeform where clause with ilike (#14900)

This commit is contained in:
Ville Brofeldt 2021-06-04 06:43:07 +03:00 committed by GitHub
parent 004a6d9e54
commit 20b86f81e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -223,10 +223,10 @@ class FilterBox extends React.PureComponent {
? [ ? [
{ {
clause: 'WHERE', clause: 'WHERE',
comparator: null, expressionType: 'SIMPLE',
expressionType: 'SQL', subject: key,
// TODO: Evaluate SQL Injection risk operator: 'ILIKE',
sqlExpression: `lower(${key}) like '%${input}%'`, comparator: `%${input}%`,
}, },
] ]
: null, : null,