From 43e66c6415d6397b0ee93d64dc80c742072f3ada Mon Sep 17 00:00:00 2001 From: Michael Merickel Date: Sun, 28 Jan 2024 23:17:29 -0700 Subject: upgrade phash implementation from md5 to sha256 --- src/pyramid/config/predicates.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/pyramid/config/predicates.py b/src/pyramid/config/predicates.py index db5df0347..15d990b95 100644 --- a/src/pyramid/config/predicates.py +++ b/src/pyramid/config/predicates.py @@ -1,4 +1,4 @@ -from hashlib import md5 +from hashlib import sha256 from webob.acceptparse import Accept from pyramid.exceptions import ConfigurationError @@ -8,7 +8,7 @@ from pyramid.registry import predvalseq from pyramid.util import TopologicalSorter, bytes_, is_nonstr_iter MAX_ORDER = 1 << 30 -DEFAULT_PHASH = md5().hexdigest() +DEFAULT_PHASH = sha256().hexdigest() class PredicateConfiguratorMixin: @@ -137,7 +137,7 @@ class PredicateList: # phash) that can be used by a caller to identify identical predicate # lists. ordered = self.sorter.sorted() - phash = md5() + phash = sha256() weights = [] preds = [] info = PredicateInfo( -- cgit v1.2.3