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

Add nonce for Safari 12+ #11966

Merged
merged 1 commit into from
Oct 23, 2018
Merged

Add nonce for Safari 12+ #11966

merged 1 commit into from
Oct 23, 2018

Conversation

rullzer
Copy link
Member

@rullzer rullzer commented Oct 21, 2018

As far as I can tell this should work now.

Please test with Safari of course ;)

As far as I can tell this should work now.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer rullzer added enhancement 3. to review Waiting for reviews labels Oct 21, 2018
@rullzer rullzer added this to the Nextcloud 15 milestone Oct 21, 2018
@rullzer
Copy link
Member Author

rullzer commented Oct 21, 2018

Ah so small tests steps

without this patch if you look at the source there is no nonce-<LONG CODE> with this patch there is. for all loaded JS etc.

Of course also everything should continue to work with this patch 😉

@rullzer
Copy link
Member Author

rullzer commented Oct 23, 2018

Ah my bad. That is what you get when writing this late at night.

The nonce is already there all the time.
It is just that now it is enforced in the CSP.

So

  1. open your developer console
  2. see the request to the main page you are on
  3. Check the content security policy header
  4. There should be a none- element there

Copy link
Member

@Ivansss Ivansss left a comment

Choose a reason for hiding this comment

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

Tested and works 👍 I get the nonce-<LONG CODE> in the Content-Security-Policy header of the response.

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobke MorrisJobke merged commit 92b5b54 into master Oct 23, 2018
@MorrisJobke MorrisJobke deleted the csp/safari12-support branch October 23, 2018 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants