diff options
author | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-10 12:04:44 +0100 |
---|---|---|
committer | Cédric Bonhomme <kimble.mandel@gmail.com> | 2013-01-10 12:04:44 +0100 |
commit | 7b304e26c7a09676b40c001188c02ef552191c14 (patch) | |
tree | 467b3861956a7d0345495fc47464ba729caf99db /source/auth.py | |
parent | Added default argument for check_credentials(). (diff) | |
download | newspipe-7b304e26c7a09676b40c001188c02ef552191c14.tar.gz newspipe-7b304e26c7a09676b40c001188c02ef552191c14.tar.bz2 newspipe-7b304e26c7a09676b40c001188c02ef552191c14.zip |
You can now change your password form the /management page.
Diffstat (limited to 'source/auth.py')
-rwxr-xr-x | source/auth.py | 4 |
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) |