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

bugfix(SRI): Ensure that we are hashing digested file content #3404

Merged
merged 2 commits into from
May 8, 2019

Conversation

tomciopp
Copy link
Contributor

@tomciopp tomciopp commented May 7, 2019

This PR fixes the issues I brought up in #3394. I've tested this fix in production on our project and it does work as originally intended. It is slightly inefficient since we are digesting the file twice, we could improve that but I will leave for comment.

@chrismccord chrismccord requested a review from josevalim May 8, 2019 02:52
@josevalim
Copy link
Member

Unfortunately this is going to digest the contents twice. Can you please digest it only once and pass it around accordingly? Thank you.

@josevalim
Copy link
Member

Also, please include a test, so we avoid doing the same mistake in the future. Thank you!

…file a single time. Add test that verifies integrity hash is correctly generated
@tomciopp
Copy link
Contributor Author

tomciopp commented May 8, 2019

@josevalim You're right, I've updated the PR to reflect the requested changes.

@tomciopp
Copy link
Contributor Author

tomciopp commented May 8, 2019

I also ran the formatter so there might be some extra changes that are reflected.

@josevalim
Copy link
Member

Thank you! But please do not format and change code the next time around, as it makes it really hard to review PRs, backport the code, etc.

@josevalim josevalim merged commit 88af3f2 into phoenixframework:master May 8, 2019
@josevalim
Copy link
Member

❤️ 💚 💙 💛 💜

josevalim pushed a commit that referenced this pull request May 8, 2019
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
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

2 participants