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

Rewriting integrity attribute for resources that implement Subresource Integrity #371

Closed
logpanic opened this issue Jan 16, 2018 · 0 comments · Fixed by #374
Closed

Rewriting integrity attribute for resources that implement Subresource Integrity #371

logpanic opened this issue Jan 16, 2018 · 0 comments · Fixed by #374
Assignees

Comments

@logpanic
Copy link
Contributor

We recently ran across this issue in a site we're archiving.
The site has numerous resources that implement the subresource integrity feature. And as the file changes when its archived, the hash is no longer valid, and the resource is blocked from replay.

<link rel="stylesheet" media="print" href="https://assets.publishing.service.gov.uk/static/govuk-template-print-1076519521c2fffbbf75ab3b0d3b32ee2d96ac7e9778f1cdfac1771eefd1a1c0.css" crossorigin="anonymous" integrity="sha256-EHZRlSHC//u/das7DTsy7i2WrH6XePHN+sF3Hu/RocA=">

in IA's production version of Wayback, they've removed the hash from the integrity attribute

<link rel="stylesheet" media="print" href="https://web.archive.org/web/20171201195821cs_/https://assets.publishing.service.gov.uk/static/govuk-template-print-1076519521c2fffbbf75ab3b0d3b32ee2d96ac7e9778f1cdfac1771eefd1a1c0.css" crossorigin="anonymous" integrity="">

and from viewing pywb's code, it looks like the integrity attribute is either removed (https://github.com/webrecorder/pywb/blob/9c5673968c8067254d5dad72def5a8ddcd1b3fa0/pywb/static/wombat.js#L1515) or renamed (https://github.com/webrecorder/pywb/blob/develop/pywb/rewrite/html_rewriter.py#L323)

I'm proposing some type of rewrite feature that handles the integrity attribute for linked resources.

ldko added a commit to ldko/openwayback that referenced this issue Feb 5, 2018
@ldko ldko closed this as completed in #374 Mar 6, 2018
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 a pull request may close this issue.

2 participants