You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use postman/insomnia http client to call/test all superset API.
And we found that /superset/sql_json/ API don't have validation for required fields. For example if we don't provide sql field in JSON body of request we get such error: "message": "Failed to execute query '164' - 'None': 'NoneType' object has no attribute 'strip'" and then Query History record is created with sql column is null (db table - query)
How to reproduce the bug
Call login API to auth
Call /superset/sql_json/ API without sql field
See response error
See error for /api/v1/query/ API
Expected results
We have to validate required fields for /superset/sql_json/ API .
Actual results
There's no validation for /superset/sql_json/ API .
Columns sql has null value in db table - query. /api/v1/query/ API is broken with error message is "error": "'NoneType' object has no attribute 'strip'"
Screenshots
Environment
(please complete the following information):
browser type and version:
superset version: superset version
python version: python --version
node.js version: node -v
any feature flags active:
Checklist
Make sure to follow these steps before submitting your issue - thank you!
I have checked the superset logs for python stacktraces and included it here as text if there are any.
I have reproduced the issue with at least the latest released version of superset.
I have checked the issue tracker for the same issue and I haven't found one similar.
We use postman/insomnia http client to call/test all superset API.
And we found that
/superset/sql_json/
API don't have validation for required fields. For example if we don't providesql
field in JSON body of request we get such error:"message": "Failed to execute query '164' - 'None': 'NoneType' object has no attribute 'strip'"
and then Query History record is created withsql
column isnull
(db table -query
)How to reproduce the bug
login
API to auth/superset/sql_json/
API withoutsql
field/api/v1/query/
APIExpected results
We have to validate required fields for
/superset/sql_json/
API .Actual results
There's no validation for
/superset/sql_json/
API .Columns sql has null value in db table -
query
./api/v1/query/
API is broken with error message is"error": "'NoneType' object has no attribute 'strip'"
Screenshots
Environment
(please complete the following information):
superset version
python --version
node -v
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
Add any other context about the problem here.
@michael-s-molina @kgabryje @codyml @zhaoyongjie @diegomedina248 @jinghua-qa @geido @AAfghahi @srinify
The text was updated successfully, but these errors were encountered: