logging: improve how we log user lookup

This commit is contained in:
Marcin Kuzminski 2016-06-03 01:07:00 +02:00
parent b44222de22
commit cba71c524a

View file

@ -437,8 +437,7 @@ def ValidAuth():
password = value['password']
username = value['username']
if not authenticate(username, password, '',
HTTP_TYPE,
if not authenticate(username, password, '', HTTP_TYPE,
skip_missing=True):
user = User.get_by_username(username)
if user and not user.active:
@ -448,7 +447,7 @@ def ValidAuth():
msg, value, state, error_dict={'username': msg}
)
else:
log.warning('user %s failed to authenticate', username)
log.warning('user `%s` failed to authenticate', username)
msg = M(self, 'invalid_username', state)
msg2 = M(self, 'invalid_password', state)
raise formencode.Invalid(