You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some circumstances, pip may record an invalid hash in the origin.json file in wheel cache entries.
This happens when an invalid hash is provided as URL fragment, together with a good hash provided with --hash.
In such cases pip does not validate the hash provided as URL fragment.
The cache logic however assumes such hash has been validated elsewhere in pip and records it without verifying it.
Expected behavior
We should probably compute a set of strong hash when generating origin.json.
Besides resolving this bug, this would also be more predictable, with known hash algorithms recorded in cache entries.
Description
In some circumstances, pip may record an invalid hash in the
origin.json
file in wheel cache entries.This happens when an invalid hash is provided as URL fragment, together with a good hash provided with
--hash
.In such cases pip does not validate the hash provided as URL fragment.
The cache logic however assumes such hash has been validated elsewhere in pip and records it without verifying it.
Expected behavior
We should probably compute a set of strong hash when generating
origin.json
.Besides resolving this bug, this would also be more predictable, with known hash algorithms recorded in cache entries.
pip version
Since 22.2
Python version
any
OS
any
How to Reproduce
Create and install a requirements.txt like this:
Notice the hash recorded in
origin.json
isinvalid
.Output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: