From 8fa926c9f4ae4d5b0ce750c2412701584cb2226a Mon Sep 17 00:00:00 2001 From: Grimmer Date: Sun, 17 Sep 2017 03:22:51 +0800 Subject: [PATCH] Encode password string before hashing. This is needed for Python 3 and compatible with Python 2. --- MeteorClient.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MeteorClient.py b/MeteorClient.py index d16d69f..476cdf2 100644 --- a/MeteorClient.py +++ b/MeteorClient.py @@ -114,7 +114,7 @@ def login(self, user, password, token=None, callback=None): # we need to authenticate # hash the password - hashed = hashlib.sha256(password).hexdigest() + hashed = hashlib.sha256(password.encode('utf-8')).hexdigest() # handle username or email address if '@' in user: user_object = {