-
Notifications
You must be signed in to change notification settings - Fork 28
fix(codegen-ui-react): add sanitization to binding expression #1174
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1174 +/- ##
==========================================
+ Coverage 93.86% 93.87% +0.01%
==========================================
Files 150 150
Lines 6114 6127 +13
Branches 1838 1838
==========================================
+ Hits 5739 5752 +13
Misses 357 357
Partials 18 18
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
buildAuthExpression
may run into the same issue. Wouldn't this be a problem anywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Problem
When Amplify Studio processes components with collection types, it recursively renders children and builds expression bindings without properly sanitizing them.
Solution
Updated property binding process:
buildBindingExpression
to safely handle property valuescredit @iCodeForBananas
Additional Notes
Links
Ticket
GitHub issue:
Other links
Verification
Manual tests
Automated tests
Housekeeping
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.