aminghadersohi opened a new pull request, #38990:
URL: https://github.com/apache/superset/pull/38990

   ## Summary
   
   Four fixes for MCP service tools:
   
   1. **ASCII preview for table charts**: `ASCIIPreviewStrategy` now checks for 
`all_columns`/`query_mode: "raw"` when building query context, preventing 
"Empty query?" errors on table-type charts.
   
   2. **Table chart compile check**: `_build_query_columns()` in 
`preview_utils.py` applies the same raw-mode handling so table chart generation 
compile checks pass.
   
   3. **Table chart form_data**: `map_table_config()` now includes `"columns"` 
alongside `"all_columns"` in raw mode so downstream `QueryContextFactory` 
validation passes.
   
   4. **Dashboard title XSS**: `GenerateDashboardRequest` now sanitizes 
`dashboard_title` via `@field_validator` using `sanitize_user_input()`, 
matching the existing pattern in chart schemas.
   
   ## Test plan
   
   - [ ] `get_chart_preview` with `format: "ascii"` on a table chart returns 
data instead of "Empty query?"
   - [ ] `generate_chart` with `chart_type: "table"` and raw columns succeeds
   - [ ] `generate_dashboard` with XSS payload in title stores sanitized version


-- 
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