This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new 20b86f8 fix(filter box): replace freeform where clause with ilike
(#14900)
20b86f8 is described below
commit 20b86f81e783a88bc35b2387f28f8928aae4b730
Author: Ville Brofeldt <[email protected]>
AuthorDate: Fri Jun 4 06:43:07 2021 +0300
fix(filter box): replace freeform where clause with ilike (#14900)
---
superset-frontend/src/visualizations/FilterBox/FilterBox.jsx | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
index d90781b..8a5a867 100644
--- a/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
+++ b/superset-frontend/src/visualizations/FilterBox/FilterBox.jsx
@@ -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,