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

Convert QuerySet to list before pickling for matching hmac #96

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

Conversation

felix-engelmann
Copy link

The QuerySet of 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 QuerySet to a simple list does not weaken any security regarding malicious changes on the preview form.

@felix-engelmann
Copy link
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
Copy link

codecov bot commented Feb 6, 2021

Codecov Report

Merging #96 (ec6850d) into master (3b16167) will increase coverage by 0.22%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            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              
Impacted Files Coverage Δ
formtools/utils.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b16167...ec6850d. Read the comment docs.

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.

1 participant