From ca467c55d8bbd633870c1fcaff0677bc2c6eaa9f Mon Sep 17 00:00:00 2001 From: Emil Renner Berthing Date: Sat, 29 Feb 2020 14:09:39 +0100 Subject: space_server: update to Fedora 31 --- roles/space_server/files/radius/assha.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'roles/space_server/files/radius/assha.py') diff --git a/roles/space_server/files/radius/assha.py b/roles/space_server/files/radius/assha.py index e34c382..6d81be1 100755 --- a/roles/space_server/files/radius/assha.py +++ b/roles/space_server/files/radius/assha.py @@ -10,7 +10,7 @@ REXP = re.compile('^([^ ]+) ASSHA-Password := "(.*)"$') def authorize(p): #radiusd.radlog(radiusd.L_INFO, '*** radlog call in authorize ***') reply = ( ('Reply-Message', 'Welcome to Labitat!'), ) - config = ( ('Auth-Type', 'python'), ) + config = ( ('Auth-Type', 'python3'), ) return (radiusd.RLM_MODULE_OK, reply, config) def load_users(): @@ -30,7 +30,7 @@ def check_pwd(user, pw): assha = users[user] crypted = assha[:40] salt = assha[40:] - h = hashlib.sha1('--%s--%s--' % (salt, pw)).hexdigest() + h = hashlib.sha1('--{}--{}--'.format(salt, pw).encode('utf-8')).hexdigest() return h == crypted def authenticate(p): -- cgit v1.2.1