You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rusackas (via GitHub)" <gi...@apache.org> on 2026/06/01 23:06:07 UTC
[PR] fix(legacy-preset-chart-nvd3): sanitize tooltip HTML built from chart data [superset]
rusackas opened a new pull request, #40619:
URL: https://github.com/apache/superset/pull/40619
### SUMMARY
Several tooltip generators in `legacy-preset-chart-nvd3/src/utils.ts` build HTML strings from chart data and return them to be rendered via D3 `.html()`, but — unlike their sibling generators in the same file (`generateCompareTooltipContent`, `generateTimePivotTooltip`) which already call `dompurify.sanitize()` — they returned the HTML unsanitized:
- `generateBubbleTooltipContent` (entity / group / color)
- `generateMultiLineTooltipContent` (series keys)
- `tipFactory` annotation tooltip callback (title / description columns)
This applies `dompurify.sanitize()` to the returned HTML in all three, so data-derived values render as text rather than markup. Consistent with the existing pattern in the file; no change to legitimate tooltip output.
### TESTING INSTRUCTIONS
```bash
cd superset-frontend && npx jest plugins/legacy-preset-chart-nvd3/test/utils.test.ts
```
Adds regression tests asserting that script/handler markup placed in the data-derived fields is stripped from the generated tooltip HTML (12/12 pass).
### ADDITIONAL INFORMATION
- [ ] Has associated issue: n/a
- [ ] Changes UI: No
- [ ] Includes DB Migration: No
- [ ] Introduces new feature or API: No
- [ ] Removes existing feature or API: No
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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
Re: [PR] fix(legacy-preset-chart-nvd3): sanitize tooltip HTML built from chart data [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #40619:
URL: https://github.com/apache/superset/pull/40619#issuecomment-4608019617
Superseded by #40502, which landed the same `dompurify.sanitize` wrapping for all three nvd3 tooltip sinks (`generateBubbleTooltipContent`, `generateMultiLineTooltipContent`, and the `tipFactory` annotation path) along with equivalent regression tests. Nothing here survives a rebase, so closing as redundant. Thanks #40502! 🙏
--
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
Re: [PR] fix(legacy-preset-chart-nvd3): sanitize tooltip HTML built from chart data [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #40619:
URL: https://github.com/apache/superset/pull/40619#issuecomment-4597213988
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 4debd2d01ac40dfbed98e0a07467b35135000731 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a1e105f9802a500088fbb00 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-40619--superset-docs-preview.netlify.app](https://deploy-preview-40619--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#DcpLCoUwDADAu2RtMT5RqjfwGKm1GKhN0fDwg3e3u1nMA3mXLSuMABW4ndK8Fgc-6_T3rVGRqJzNqls0ByVWvklZUtl-yVGuyZffU7M02IXB4o86RLQ2OIcI7wc) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-40619--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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
Re: [PR] fix(legacy-preset-chart-nvd3): sanitize tooltip HTML built from chart data [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #40619:
URL: https://github.com/apache/superset/pull/40619#issuecomment-4597335743
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40619?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.04%. Comparing base ([`87be424`](https://app.codecov.io/gh/apache/superset/commit/87be424f9c4f1841d7185047cab4aaf9450265ac?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`4debd2d`](https://app.codecov.io/gh/apache/superset/commit/4debd2d01ac40dfbed98e0a07467b35135000731?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 29 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #40619 +/- ##
==========================================
+ Coverage 64.02% 64.04% +0.02%
==========================================
Files 2648 2648
Lines 142275 142275
Branches 32695 32695
==========================================
+ Hits 91088 91122 +34
+ Misses 49629 49595 -34
Partials 1558 1558
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/40619/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/40619/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.41% <100.00%> (+0.04%)` | :arrow_up: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/40619?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] fix(legacy-preset-chart-nvd3): sanitize tooltip HTML built from chart data [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40619:
URL: https://github.com/apache/superset/pull/40619#issuecomment-4597199445
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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
Re: [PR] fix(legacy-preset-chart-nvd3): sanitize tooltip HTML built from chart data [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed pull request #40619: fix(legacy-preset-chart-nvd3): sanitize tooltip HTML built from chart data
URL: https://github.com/apache/superset/pull/40619
--
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