diff options
Diffstat (limited to 'pyload/database/User.py')
-rw-r--r-- | pyload/database/User.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pyload/database/User.py b/pyload/database/User.py index 94f70d499..e11961e32 100644 --- a/pyload/database/User.py +++ b/pyload/database/User.py @@ -6,6 +6,7 @@ import random from pyload.database import DatabaseBackend, style + class UserMethods(object): @@ -29,7 +30,7 @@ class UserMethods(object): @style.queue def addUser(db, user, password): - salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for i in range(0, 5)]) + salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for _i in range(0, 5)]) h = sha1(salt + password) password = salt + h.hexdigest() @@ -52,7 +53,7 @@ class UserMethods(object): pw = r[2][5:] h = sha1(salt + oldpw) if h.hexdigest() == pw: - salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for i in range(0, 5)]) + salt = reduce(lambda x, y: x + y, [str(random.randint(0, 9)) for _i in range(0, 5)]) h = sha1(salt + newpw) password = salt + h.hexdigest() |