aboutsummaryrefslogtreecommitdiff
path: root/source/auth.py
diff options
context:
space:
mode:
authorCédric Bonhomme <kimble.mandel@gmail.com>2013-01-10 12:04:44 +0100
committerCédric Bonhomme <kimble.mandel@gmail.com>2013-01-10 12:04:44 +0100
commit7b304e26c7a09676b40c001188c02ef552191c14 (patch)
tree467b3861956a7d0345495fc47464ba729caf99db /source/auth.py
parentAdded default argument for check_credentials(). (diff)
downloadnewspipe-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-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