cancan101 opened a new issue #18994:
URL: https://github.com/apache/superset/issues/18994


   The `rison` used for query param encoding (e.g. [see 
here](https://github.com/apache/superset/blob/2491b89f2911482d9951064e541d616e396f75eb/superset-frontend/src/components/Datasource/DatasourceEditor.jsx#L642-L644))
 does not correctly encode `=` or `?`.
   
   See for example here https://runkit.com/agrothberg/rison-issues how this 
`rison.encode({table_name: 'a?a=b'})` is encoded as `(table_name:a?a=b)`.
   
   Trying to parse that using the `prison` library on python (CC 
@betodealmeida): `prison.loads("(table_name:a?a=b)")` leads to 
`prison.decoder.ParserException: missing ',`.
   
   This is the underlying issue that I first saw on: 
https://github.com/apache/superset/issues/18993 however that is an independent 
issue.
   
   #### How to reproduce the bug
   
   1. Use legacy datasource editor
   2. Define a table with an `=` in its name
   3. Click sync columns from source
   
   
   ### Expected results
   
   Ideally it should handle the table name (it looks like the string is not 
properly `rison` encoded. If it isn't going to allow these strings, then at the 
very least the 400 error should be properly generated.
   
   ### Actual results
   
   Table name not parsable by the backend.
   
   #### Screenshots
   
   n/a
   
   ### Environment
   
   - browser type and version: Chrome 98.0.4758.102 
   - superset version: `Superset 1.4.1`
   - python version: `Python 3.7.3`
   - node.js version: `v15.4.0`
   - any feature flags active: n/a
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included 
it here as text if there are any.
   - [x] 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. This might be a duplicate with: 
https://github.com/apache/superset/issues/13708
   
   ### Additional context
   
   n/a
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to