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 xss vulnerability in the seo component #1839

Merged
merged 2 commits into from
Mar 12, 2024
Merged

Fix xss vulnerability in the seo component #1839

merged 2 commits into from
Mar 12, 2024

Conversation

blittle
Copy link
Contributor

@blittle blittle commented Mar 12, 2024

WHY are these changes introduced?

Fix XSS vulnerability

WHAT is this pull request doing?

React escapes all content within a script component. For JSON/LD, the script content cannot be escaped, so we have to use dangerouslySetInnerHTML. But instead this change introduces a 3p dependency sanitize-html to sanitize the values within the JSON/LD object. This change adds 63kb to the worker bundle.

HOW to test your changes?

See internal discussion.

Post-merge steps

Checklist

  • I've read the Contributing Guidelines
  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've added a changeset if this PR contains user-facing or noteworthy changes
  • I've added tests to cover my changes
  • I've added or updated the documentation

Copy link
Contributor

shopify bot commented Mar 12, 2024

Oxygen deployed a preview of your bl-fix-xss branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
optimistic-cart-ui ⏳ In progress (Logs) - Inspect deployment March 12, 2024 6:13 PM
skeleton ⏳ In progress (Logs) - Inspect deployment March 12, 2024 6:13 PM
vite ✅ Successful (Logs) Preview deployment Inspect deployment March 12, 2024 5:59 PM
subscriptions ⏳ In progress (Logs) - Inspect deployment March 12, 2024 6:13 PM
custom-cart-method ⏳ In progress (Logs) - Inspect deployment March 12, 2024 6:13 PM
third-party-queries-caching ⏳ In progress (Logs) - Inspect deployment March 12, 2024 6:13 PM

Learn more about Hydrogen's GitHub integration.

@blittle blittle merged commit 2888014 into main Mar 12, 2024
13 checks passed
@blittle blittle deleted the bl-fix-xss branch March 12, 2024 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants