diff options
author | Emil Renner Berthing <esmil@labitat.dk> | 2020-02-29 14:09:39 +0100 |
---|---|---|
committer | Emil Renner Berthing <esmil@labitat.dk> | 2020-02-29 23:48:24 +0100 |
commit | ca467c55d8bbd633870c1fcaff0677bc2c6eaa9f (patch) | |
tree | 563ec89a5690de52204379dab46556b0926d7a39 /roles/space_server/files/radius/assha.py | |
parent | 543907b4fb61a529f81e0cbe86fd7e7d967b6d60 (diff) | |
download | labitat-ansible-ca467c55d8bbd633870c1fcaff0677bc2c6eaa9f.tar.gz labitat-ansible-ca467c55d8bbd633870c1fcaff0677bc2c6eaa9f.tar.xz labitat-ansible-ca467c55d8bbd633870c1fcaff0677bc2c6eaa9f.zip |
space_server: update to Fedora 31
Diffstat (limited to 'roles/space_server/files/radius/assha.py')
-rwxr-xr-x | roles/space_server/files/radius/assha.py | 4 |
1 files changed, 2 insertions, 2 deletions
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): |