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

SRI/CORS warnings for same origin SRI #76

Open
hannob opened this issue Dec 28, 2023 · 0 comments
Open

SRI/CORS warnings for same origin SRI #76

hannob opened this issue Dec 28, 2023 · 0 comments

Comments

@hannob
Copy link

hannob commented Dec 28, 2023

I recently got a warning about SRI/CORS that I believe is a bug in Hardenize.

I have reduced it to a simplified example. Compare these:

The two websites include a javascript on the same origin with an SRI hash, and are almost identical. The only difference is that t0 uses src="/test.js" (leading slash), while t1 other uses src="test.js" (no slash). The latter gets several warnings from Hardenize ("Invalid local SRI CORS configuration", "Invalid remote SRI CORS configuration", "Invalid SRI configuration").

This is probably a bug in Hardenize that somehow interprets the src without the slash as a remote origin. The javascript is fetched from the same origin, therefore no CORS is necessary.

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

No branches or pull requests

1 participant