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:16:27 UTC
[PR] fix(plugin-chart-ag-grid-table): validate filter values/operators in state converter [superset]
rusackas opened a new pull request, #40623:
URL: https://github.com/apache/superset/pull/40623
### SUMMARY
`stateConversion.ts` is the chart-state → ownState converter for the AG Grid table (registered via `registerChartStateConverter`, used on dashboards/Explore/embedded). It builds SQL filter clauses that are interpolated **without quoting**, so the inputs need validation. This hardens three spots:
- **Number filter values** are coerced with `Number()` and the filter is **skipped when the value is not finite** (they were previously interpolated as-is, unlike the text branch which already escapes).
- **Compound join operators** are restricted to `AND`/`OR` (normalized to upper case); any other value skips the clause (previously `filter.operator` was interpolated raw into the join).
- The **column-id-keyed clause map** is created with `Object.create(null)` so user-influenced column ids can't reach prototype keys.
This converter previously had **no test coverage**; this adds the first tests for `convertFilterModel` covering numeric validation, the operator allowlist, and the null-prototype map.
### TESTING INSTRUCTIONS
```bash
cd superset-frontend && npx jest plugins/plugin-chart-ag-grid-table/test/stateConversion.test.ts
```
5/5 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(plugin-chart-ag-grid-table): validate filter values/operators in state converter [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40623:
URL: https://github.com/apache/superset/pull/40623#issuecomment-4597252250
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(plugin-chart-ag-grid-table): validate filter values/operators in state converter [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40623:
URL: https://github.com/apache/superset/pull/40623#issuecomment-4608703537
**Bito Automatic Review Skipped – PR Already Merged**<br/><br/>Bito scheduled an automatic review for this pull request, but the review was skipped because this PR was merged before the review could be run.<br/>No action is needed if you didn't intend to review it. To get a review, you can type `/review` in a comment and save it
--
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(plugin-chart-ag-grid-table): validate filter values/operators in state converter [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas merged PR #40623:
URL: https://github.com/apache/superset/pull/40623
--
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(plugin-chart-ag-grid-table): validate filter values/operators in state converter [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #40623:
URL: https://github.com/apache/superset/pull/40623#issuecomment-4597268834
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 2831b57dfc42dfa6ced78b53fe46e29b1b1450b1 |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a1e12cb4f81b200071e4df4 |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-40623--superset-docs-preview.netlify.app](https://deploy-preview-40623--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#DctRCsIwDIDhu-TZYjvKFG_gMdImnYHaliwMRbz7-vbzw_eDof09DB4AF0iKLb9mF_lccXObCrnd0Dj3drDu0psrUo3VHViF0OaZkHjU_n3SpCsGDktOsdxDWrz3t8CRSoT_CQ) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-40623--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(plugin-chart-ag-grid-table): validate filter values/operators in state converter [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #40623:
URL: https://github.com/apache/superset/pull/40623#issuecomment-4597305567
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40623?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `78.57143%` with `3 lines` in your changes missing coverage. Please review.
: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 ([`2831b57`](https://app.codecov.io/gh/apache/superset/commit/2831b57dfc42dfa6ced78b53fe46e29b1b1450b1?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.
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/40623?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [.../plugin-chart-ag-grid-table/src/stateConversion.ts](https://app.codecov.io/gh/apache/superset/pull/40623?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-ag-grid-table%2Fsrc%2FstateConversion.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtYWctZ3JpZC10YWJsZS9zcmMvc3RhdGVDb252ZXJzaW9uLnRz) | 78.57% | [3 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/40623?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #40623 +/- ##
==========================================
+ Coverage 64.02% 64.04% +0.02%
==========================================
Files 2648 2648
Lines 142275 142281 +6
Branches 32695 32697 +2
==========================================
+ Hits 91088 91130 +42
+ Misses 49629 49593 -36
Partials 1558 1558
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/40623/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/40623/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.42% <78.57%> (+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/40623?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