You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "villebro (via GitHub)" <gi...@apache.org> on 2023/03/13 10:54:59 UTC
[GitHub] [superset] villebro commented on a diff in pull request #23344: feat(embedded): Add 'urlParams' option to pass query parameters to embedded dashboard(for SQL templating)
villebro commented on code in PR #23344:
URL: https://github.com/apache/superset/pull/23344#discussion_r1133753124
##########
superset-embedded-sdk/src/index.ts:
##########
@@ -116,6 +117,8 @@ export async function embedDashboard({
+ filterConfigKeys
.map(key => DASHBOARD_UI_FILTER_CONFIG_URL_PARAM_KEY[key] + '=' + filterConfig[key]).join('&')
: ""
+ let extraUrlParams = new URLSearchParams(dashboardUiConfig?.urlParams || window.location.search).toString()
Review Comment:
Introducing this now could be seen as a breaking change and has security implications, as it will start sending through all url params. How do you feel about the following?
1. Adding the possibility of providing static mappings (the `dashboardUiConfig?.urlParams` part in this PR).
2. Adding the possibility to let through all params (the `window.location.search` part in this PR).
3. Adding the possibility to allowlist specific URL params (not made possible here)
I think we should not assume 2 unless it's been explicitly allowed. WDYT?
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org