geido commented on code in PR #45273:
URL: https://github.com/apache/superset/pull/45273#discussion_r4285469607


##########
superset/views/datasource/views.py:
##########
@@ -444,6 +445,12 @@ def samples(self) -> FlaskResponse:
             datasource=dataset,
             dashboard_id=dashboard_id,
         )
+        # Drill to detail is available to embedded guests (see the guest branch
+        # above), and the samples payload carries the generated SQL under
+        # ``query``. Apply the same guest redaction ``/api/v1/chart/data`` has
+        # applied since CVE-2025-55673 so the SQL is not disclosed to a guest
+        # whose role lacks "can view query on Dashboard".
+        redact_sensitive_query_fields([rv])

Review Comment:
   Right, success path only by design. On failure `get_samples` raises, so the 
generic guest error comes from `handle_api_exception`; added tests pinning that 
for samples (7d80473).



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