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

Implement Subresource Integrity #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Serkan-devel
Copy link

@Serkan-devel Serkan-devel commented Feb 25, 2018

In response to #27:

Because this site unfortunately uses many 3rd-party resources, it might be good to minimize the likelihood of it contaminating the page.

For that I've added two things in between angle brackets:

  • crossorigin="anonymous"
    This prevents external sites from loading cookies onto the browser. Only the IP gets logged by them.
  • integrity="sha256-[base64]"
    If the CDN gets tampered and files get switched with malware, then the hash might differ and the resource file won't be loaded, the site might break but the user is safe.

It doesn't cover the main.css-file because it's hosted on the local server and I can only find an uncompiled scss version of it.

This was referenced Feb 25, 2018
@Serkan-devel
Copy link
Author

Oh and to get the hash value, I ran

cat material.min.js|openssl dgst -sha256 -binary|openssl base64

I'd also like to reference this https://www.minds.com/newsfeed/652107961128198152

@markharding markharding force-pushed the master branch 4 times, most recently from b3d79c1 to 26b051e Compare April 17, 2020 08:54
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

1 participant