From be0a5f5e99a6e87add29d627bccf9cff99185a41 Mon Sep 17 00:00:00 2001 From: Leo VIALLON-GALINIER Date: Thu, 24 Jan 2019 20:13:35 +0100 Subject: [PATCH] Correcting user name in logging --- sauth/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sauth/__init__.py b/sauth/__init__.py index d2620b3..360b853 100644 --- a/sauth/__init__.py +++ b/sauth/__init__.py @@ -147,7 +147,7 @@ class SAuth(object): if(user is not None): pw=user.password if pw is None or not len(pw.split('/'))==3 : - logger.warn("Login FAIL user {} from {}".format(user, ip)) + logger.warn("Login FAIL user {} from {}".format(username, ip)) _redirect(fail_redirect) return False pw=pw.split('/') @@ -158,11 +158,11 @@ class SAuth(object): if(pw[2]==pwtest): get_session()['username']=username get_session()['roles']=self.get_user_roles(username) - logger.info("Login OK user {} from {}".format(user, ip)) + logger.info("Login OK user {} from {}".format(username, ip)) if(success_redirect is not None): _redirect(success_redirect) return True - logger.warn("Login FAIL user {} from {}".format(user, ip)) + logger.warn("Login FAIL user {} from {}".format(username, ip)) _redirect(fail_redirect) return False