-
Notifications
You must be signed in to change notification settings - Fork 792
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
Fix integrity hash #555 #556
Conversation
Thanks for the pull request, and welcome! The Rails team is excited to review your changes, and you should hear from @schneems (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
We need a test that show this is broken so it doesn't regress again |
Hello @rafaelfranca , should I make changes in current PR or this work for rails team? |
@schneems Check this please |
Yes, we should apply the changes to this PR |
Do you need help writing a test? |
Hello, no, need help with revert commit |
What do you need to revert? Generally I use
This will open your last 3 commits in your $EDITOR. You can remove a commit by deleting it from the file and then saving it. |
For now though don’t worry about adding extra commits. Just worry about getting the code like we want it and a regression test and we can squash all the changes later. |
I will revert commit and write test tomorrow, I will need help with
|
Hello @rafaelfranca, @schneems,
|
what next? |
Hello, any updates? |
I think the core problem here is that we fundamentally want to recompile all assets when the version changes, however that digest is being used for an integrity hash which is not correct. I don't know if there's a straightforward way to do that. One option could be to store the cache version in each object, then before it gets read and used, the version gets checked to see if it is valid. This is somewhat similar to how rails' "recyclable cache keys" work https://www.schneems.com/2018/10/17/cache-invalidation-complexity-rails-52-and-dalli-cache-store/. |
I think we need revert #404 to fix worked SRI feature |
I think either the version needs to not be included in the digest, or the digest and the integrity hash need to be two separate things. I can think of a couple ways forward:
Thoughts? This is pretty broken right now if you ask me. |
Closed by 5038ad5 |
#555
rails/sprockets-rails#393