File tree 2 files changed +2
-2
lines changed
2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ def cache_key(**kw):
117
117
118
118
:param kw: keys/values to compute cache key from
119
119
"""
120
- return hashlib .md5 (repr (kw ).encode ()).hexdigest ()
120
+ return hashlib .md5 (repr (kw ).encode (), usedforsecurity = False ).hexdigest ()
121
121
122
122
123
123
def hash_hexdigest (content , bufsize = 4096 ):
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ def _loadPluginModule(cfg):
202
202
cfg ._plugin_modules = []
203
203
for pdir in cfg .plugin_dirs :
204
204
assert isinstance (pdir , str )
205
- modname = "moin_p_{}" .format (hashlib .new ("sha1" , pdir .encode ()).hexdigest ())
205
+ modname = "moin_p_{}" .format (hashlib .new ("sha1" , pdir .encode (), usedforsecurity = False ).hexdigest ())
206
206
if modname not in sys .modules :
207
207
init_path = os .path .join (os .path .abspath (pdir ), "__init__.py" )
208
208
spec = importlib .util .spec_from_file_location (modname , init_path )
You can’t perform that action at this time.
0 commit comments