From acb292460f8d69db283faee2bd58ef62229d0e83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A1lint=20Bokros?= Date: Mon, 19 Feb 2018 09:49:51 +0100 Subject: [PATCH] Log token setup failure properly --- src/controller/app.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/controller/app.py b/src/controller/app.py index a6ae9b6..b2a9118 100644 --- a/src/controller/app.py +++ b/src/controller/app.py @@ -15,7 +15,10 @@ log = logging.getLogger(__name__) async def setup_token(solvable_connector, token): solvable_connector.send('token', token) key, data = await solvable_connector.recv() - log.debug('Token setup is done.') + if secrets.compare_digest(token, key): + log.debug('Token setup is done.') + else: + log.error('Failed to setup token between controller and solvable.') # TODO: signaling to Avatao platform? if __name__ == '__main__': kwargs = {