Closed ssstankly closed 2 years ago
Your Python version is 'too old', the 2-argument version of hashlib.md5
was introduced in 3.9:
(https://docs.python.org/3.9/library/hashlib.html):
Changed in version 3.9: All hashlib constructors take a keyword-only argument usedforsecurity with default value True. A false value allows the use of insecure and blocked hashing algorithms in restricted environments. False indicates that the hashing algorithm is not used in a security context, e.g. as a non-cryptographic one-way compression function.
Either update Python to something more current (3.10 is current, 3.9 would work as well) or remove the second parameter:
--- spodcast/spodcast/spodcast.py.org 2022-06-17 21:24:16.344970958 +0000
+++ spodcast/spodcast/spodcast.py 2022-06-17 21:24:34.076795874 +0000
@@ -58,7 +58,7 @@ class Spodcast:
cred_directory = Config.get_config_dir()
if os.path.isdir(cred_directory):
(username,password) = line.split()
- cred_filename = CREDENTIALS_PREFIX + "-" + hashlib.md5(username.encode('utf-8'),usedforsecurity=False).hexdigest() + ".json"
+ cred_filename = CREDENTIALS_PREFIX + "-" + hashlib.md5(username.encode('utf-8')).hexdigest() + ".json"
cred_location = os.path.join(cred_directory, cred_filename)
conf = Session.Configuration.Builder().set_stored_credential_file(cred_location).build()
session = Session.Builder(conf).user_pass(username, password).create()
How am I blowing this?