Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(frontend): allow "constructor" property in response data #25407

Merged
merged 8 commits into from
Apr 6, 2024

Conversation

SpencerTorres
Copy link
Contributor

SUMMARY

Fixes #23953

Allows response JSON to be parsed with a property containing the name "constructor".
The json-bigint module has some safety options in place to prevent prototype pollution, but it prevents the queries from loading data where the columns contain constructor in the name/value. For example, test_constructor and constructor would both throw an error.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

See #23953 for example query

ADDITIONAL INFORMATION

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@rusackas
Copy link
Member

Thanks for the rebase @SpencerTorres :) Running CI now and added a few reviewers. Hopefully we can get this across the finish line and close out the issue!

@SpencerTorres
Copy link
Contributor Author

looks like CI was broken on master when I pulled. Updated again

@SpencerTorres
Copy link
Contributor Author

Looks like master is consistently failing to run, however I did fix a new one-line lint issue related to test code added in this commit. Updated again

@rusackas
Copy link
Member

CI running... fingers crossed!

Copy link

codecov bot commented Mar 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.39%. Comparing base (2948abc) to head (cee73c4).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #25407   +/-   ##
=======================================
  Coverage   67.39%   67.39%           
=======================================
  Files        1909     1909           
  Lines       74736    74738    +2     
  Branches     8326     8326           
=======================================
+ Hits        50367    50369    +2     
  Misses      22319    22319           
  Partials     2050     2050           
Flag Coverage Δ
javascript 57.22% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rusackas
Copy link
Member

Looks like CI is happy now! Re-pinging @betodealmeida @john-bodley @villebro to see if they have a moment to help with a review.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, an interesting issue, thanks for the fix and great tests! TIL

@villebro
Copy link
Member

villebro commented Apr 5, 2024

@SpencerTorres would you be able to rebase the PR? The mandatory CI workflows have changed since CI last run, causing a few of them to now be missing.

@rusackas
Copy link
Member

rusackas commented Apr 6, 2024

kicking off CI. Fingers crossed!

@villebro villebro merged commit a1983e4 into apache:master Apr 6, 2024
33 checks passed
@michael-s-molina michael-s-molina added v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch labels Apr 8, 2024
michael-s-molina pushed a commit that referenced this pull request Apr 8, 2024
michael-s-molina pushed a commit that referenced this pull request Apr 8, 2024
michael-s-molina pushed a commit that referenced this pull request Apr 8, 2024
EnxDev pushed a commit to EnxDev/superset that referenced this pull request Apr 12, 2024
michael-s-molina pushed a commit that referenced this pull request Apr 16, 2024
qleroy pushed a commit to qleroy/superset that referenced this pull request Apr 28, 2024
@mistercrunch mistercrunch added 🍒 3.1.3 🍒 4.0.1 🍒 4.0.2 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels labels Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels packages size/S v3.1 Label added by the release manager to track PRs to be included in the 3.1 branch v4.0 Label added by the release manager to track PRs to be included in the 4.0 branch 🍒 3.1.3 🍒 4.0.1 🍒 4.0.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Object contains forbidden constructor property" error when using specific word
5 participants