From d7a33e5a14e328bee198bbb97857aa18c70c76b7 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Wed, 21 Aug 2019 16:11:07 +0200 Subject: [PATCH] Typo --- moulinette/authenticators/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moulinette/authenticators/__init__.py b/moulinette/authenticators/__init__.py index f5c46b9e..958d85a0 100644 --- a/moulinette/authenticators/__init__.py +++ b/moulinette/authenticators/__init__.py @@ -150,7 +150,7 @@ class BaseAuthenticator(object): # We store a hash of the session_id and the session_token (the token is assumed to be secret) to_hash = "{id}:{token}".format(id=session_id, token=session_token) - hash_ = hashlib.sha256sum(to_hash).hexdigest() + hash_ = hashlib.sha256(to_hash).hexdigest() with self._open_sessionfile(session_id, 'w') as f: f.write(hash_) @@ -164,7 +164,7 @@ class BaseAuthenticator(object): raise MoulinetteError('unable_retrieve_session', exception=e) else: to_hash = "{id}:{token}".format(id=session_id, token=session_token) - hash_ = hashlib.sha256sum(to_hash).hexdigest() + hash_ = hashlib.sha256(to_hash).hexdigest() if hash_ != stored_hash: raise MoulinetteError('invalid_token')