-
Notifications
You must be signed in to change notification settings - Fork 6k
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
SAML2 Login fails with CSP in chrome based browsers #11676
Comments
The CSP rule unsafe-hashes seems to be missing in chromium based browsers. But the better solution would be to move the javascript into a separate javascript file. |
Hi @torstenwerner, thank you for the report. I think this problem is related not only to the sample but to this new feature #11631. I'll transfer this issue to the Spring Security project |
Instead of adding the <script>window.onload = () => document.forms[0].submit();</script> And then recompute the hash for this javascript and add in the meta-tag. |
To avoid relying on HTML event handlers and adding unsafe-* rules to CSP, the javascript is moved to a <script> tag. This also allows a better browser compatibility Closes spring-projectsgh-11676
To avoid relying on HTML event handlers and adding unsafe-* rules to CSP, the javascript is moved to a <script> tag. This also allows a better browser compatibility Closes gh-11676
I have checked out the branch 5.8.x, started
and opened http://localhost:8080/ . It redirects to http://localhost:8080/saml2/authenticate/one but this page fails with this error message
in the javascript console of chromium based browsers. The form submit does not work. The CSP (Content Security Policy) is inlined in the HTML of the page as a <meta> element.
It works in firefox. But that would exclude a majority of users.
If it is possible to turn off the inline CSP I would be happy to use it as a quick workaround.
The text was updated successfully, but these errors were encountered: