mirror of
https://github.com/kennethreitz/pipenv.git
synced 2026-06-05 22:50:18 +00:00
Restrict the acceptable hash type to SHA256 only
This commit is contained in:
@@ -0,0 +1 @@
|
||||
Restrict the acceptable hash type to SHA256 only.
|
||||
@@ -81,8 +81,8 @@ class HashCache(SafeFileCache):
|
||||
if can_hash:
|
||||
# hash url WITH fragment
|
||||
hash_value = self.get(new_location.url)
|
||||
if not hash_value:
|
||||
hash_value = "{}:{}".format(new_location.hash_name, new_location.hash)
|
||||
if not hash_value and new_location.hash_name == FAVORITE_HASH:
|
||||
hash_value = "{}:{}".format(FAVORITE_HASH, new_location.hash)
|
||||
hash_value = hash_value.encode('utf8')
|
||||
if not hash_value:
|
||||
hash_value = self._get_file_hash(new_location) if not new_location.url.startswith("ssh") else None
|
||||
|
||||
@@ -285,8 +285,8 @@ index ef5ba4e..8f74271 100644
|
||||
+ if can_hash:
|
||||
+ # hash url WITH fragment
|
||||
+ hash_value = self.get(new_location.url)
|
||||
+ if not hash_value:
|
||||
+ hash_value = "{}:{}".format(new_location.hash_name, new_location.hash)
|
||||
+ if not hash_value and new_location.hash_name == FAVORITE_HASH:
|
||||
+ hash_value = "{}:{}".format(FAVORITE_HASH, new_location.hash)
|
||||
+ hash_value = hash_value.encode('utf8')
|
||||
+ if not hash_value:
|
||||
+ hash_value = self._get_file_hash(new_location) if not new_location.url.startswith("ssh") else None
|
||||
|
||||
Reference in New Issue
Block a user