aboutsummaryrefslogtreecommitdiff
path: root/source/auth.py
diff options
context:
space:
mode:
Diffstat (limited to 'source/auth.py')
-rwxr-xr-xsource/auth.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/auth.py b/source/auth.py
index 3a30eefe..bfaf1b19 100755
--- a/source/auth.py
+++ b/source/auth.py
@@ -63,7 +63,9 @@ def change_password(username, new_password, password_file='./var/password'):
cw = csv.writer(csv_file_write, 'excel_french')
for user in users_list:
if user[0] == username:
- cw.writerow([user[0], new_password])
+ m = hashlib.sha1()
+ m.update(new_password.encode())
+ cw.writerow([user[0], m.hexdigest()])
result = True
else:
cw.writerow(user)
bgstack15