msyavuz commented on code in PR #44645:
URL: https://github.com/apache/superset/pull/44645#discussion_r4103145183


##########
superset/models/helpers.py:
##########
@@ -3771,6 +3771,7 @@ def get_from_clause(
                         self.schema or default_schema or "",
                         statement,
                         exclude_dataset_id=self_id,
+                        include_global_guest_rls=False,

Review Comment:
   This opt-out assumes the outer query's global guest clause covers every 
table in the virtual SQL. Doesn't a scalar sub-query or join inside it leak the 
same way the adhoc case did? e.g. `SELECT a.*, (SELECT count(*) FROM b) AS n 
FROM a` with global `org_id = 1`: the outer filter only narrows `a`, so `n` 
still counts all orgs in `b`. Pre-existing on master, fine as a follow-up.



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