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

nonce support for defer inline scripts #5156

Closed
kentcdodds opened this issue Jan 20, 2023 · 10 comments
Closed

nonce support for defer inline scripts #5156

kentcdodds opened this issue Jan 20, 2023 · 10 comments
Labels
bug Something isn't working feat:deferred

Comments

@kentcdodds
Copy link
Member

Because security please :)

image

@kentcdodds
Copy link
Member Author

Looks like this is a React issue as well: facebook/react#26026

But Deferred will need these as well I think.

@kentcdodds
Copy link
Member Author

React actually does support nonce, so we just need support for this in Remix's deferred-related scripts.

@github-actions
Copy link
Contributor

This issue has been automatically marked stale because we haven't received a response from the original author in a while 🙈. This automation helps keep the issue tracker clean from issues that are not actionable. Please reach out if you have more information for us or you think this issue shouldn't be closed! 🙂 If you don't do so within 7 days, this issue will be automatically closed.

@github-actions github-actions bot added the needs-response We need a response from the original author about this issue/PR label Apr 18, 2023
@kentcdodds
Copy link
Member Author

Still relevant.

@github-actions github-actions bot removed the needs-response We need a response from the original author about this issue/PR label Apr 18, 2023
@jack-r-warren
Copy link
Contributor

jack-r-warren commented May 2, 2023

I'm hitting this issue too. I wasn't successful in writing any tests for <Scripts />+<Await /> (JS beginner, sorry) so unfortunately can't make a PR but a tweak to #359 to pass the props down through the internal DeferredHydrationScript seems to solve this issue and #5539, in case it gives someone else a head-start here.

@brophdawg11
Copy link
Contributor

Fixed by #6389 and will be available in the next release

@brophdawg11 brophdawg11 added the awaiting release This issue has been fixed and will be released soon label Jun 14, 2023
@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-ad9adee-20230615 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-12440f3-20230616 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.18.0-pre.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version 1.18.0 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

nicholaschiang added a commit to nicholaschiang/epic-stack that referenced this issue Sep 20, 2023
This patch provides the `nonce` option to the React
`renderToPipeableStream` function so that React will add it to scripts
dynamically injected (e.g. the `<Suspense>` inline scripts).

Ref: https://react.dev/reference/react-dom/server/renderToPipeableStream#parameters
Ref: facebook/react#26026 (comment)
Ref: remix-run/remix#5156 (comment)
@brophdawg11 brophdawg11 removed the awaiting release This issue has been fixed and will be released soon label Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working feat:deferred
Projects
None yet
Development

No branches or pull requests

3 participants