diff options
author | cedricbonhomme <devnull@localhost> | 2012-11-08 23:08:35 +0100 |
---|---|---|
committer | cedricbonhomme <devnull@localhost> | 2012-11-08 23:08:35 +0100 |
commit | 901fbd154f16268ca4c9d10af8d038d684c8c4f4 (patch) | |
tree | e131333ad325c6b595345bb16113f1263a57d9dc /source/auth.py | |
parent | HTML username text input is now focused by default. (diff) | |
download | newspipe-901fbd154f16268ca4c9d10af8d038d684c8c4f4.tar.gz newspipe-901fbd154f16268ca4c9d10af8d038d684c8c4f4.tar.bz2 newspipe-901fbd154f16268ca4c9d10af8d038d684c8c4f4.zip |
Porting to Python 3.2. Better, faster, stronger.
Diffstat (limited to 'source/auth.py')
-rwxr-xr-x | source/auth.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/auth.py b/source/auth.py index 5e3243f4..5a6b5de6 100755 --- a/source/auth.py +++ b/source/auth.py @@ -62,11 +62,11 @@ def check_credentials(username, password): USERS[row[0]] = row[1] m = hashlib.sha1() - m.update(password) - if username in USERS.keys() and USERS[username] == m.hexdigest(): + m.update(password.encode()) + if username in list(USERS.keys()) and USERS[username] == m.hexdigest(): return None else: - return u"Incorrect username or password." + return "Incorrect username or password." # An example implementation which uses an ORM could be: # u = User.get(username) |