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
1 changed files with 4 additions and 4 deletions

View File

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