aboutsummaryrefslogtreecommitdiff
path: root/source/auth.py
diff options
context:
space:
mode:
authorcedricbonhomme <devnull@localhost>2012-11-08 23:08:35 +0100
committercedricbonhomme <devnull@localhost>2012-11-08 23:08:35 +0100
commit901fbd154f16268ca4c9d10af8d038d684c8c4f4 (patch)
treee131333ad325c6b595345bb16113f1263a57d9dc /source/auth.py
parentHTML username text input is now focused by default. (diff)
downloadnewspipe-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-xsource/auth.py6
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)
bgstack15