Convert QuerySet to list before pickling for matching hmac#96
Open
felix-engelmann wants to merge 16 commits intojazzband:masterfrom
Open
Convert QuerySet to list before pickling for matching hmac#96felix-engelmann wants to merge 16 commits intojazzband:masterfrom
felix-engelmann wants to merge 16 commits intojazzband:masterfrom
Conversation
Author
|
I experienced problems of different HMACs in a production environment with multiple worker threads and DB connections. The tests do not really reflect this. Any suggestions? |
fix import merge conflict, no more six but QuerySet
Codecov Report
@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 93.64% 93.86% +0.22%
==========================================
Files 10 10
Lines 519 538 +19
Branches 65 73 +8
==========================================
+ Hits 486 505 +19
Misses 20 20
Partials 13 13
Continue to review full report at Codecov.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
QuerySetof django includes fields which sometimes vary from query to query, at least with a Postgres backend. Therefore the pickled string is different which results in a different hash and a bad_hash result.Converting the
QuerySetto a simplelistdoes not weaken any security regarding malicious changes on the preview form.