mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
Fix check for already existing username in add_user. Add documentation of process for storing and validating hashed passwords.
This commit is contained in:
1 parent
f7ad1089a5
commit
3a696e0bb9
3 files changed
+32
-2
No files matched your search
@@ -33,7 +33,7 @@ def add_user(username, passphrase, name='', email='', expert=False):
|
||||
error = "Password is too long."
|
||||
|
||||
if error is None:
|
||||
if username in cfg.users.get_all():
|
||||
if username in map(lambda x: x[0], cfg.users.get_all()):
|
||||
error = "User already exists!"
|
||||
else:
|
||||
di = {
|
||||
|
||||
Reference in new issue
Block a user