# HG changeset patch # User Mads Kiilerich # Date 2015-01-06 00:54:36 # Node ID 52bf718b30f595a536bb7c7836c78c20923d1e75 # Parent c796b6bdd532128a7c7e756feabbc3915fa7fd2b auth: don't log a message when auth without username fails - that happens all the time for basic auth and ldap diff --git a/kallithea/lib/auth_modules/__init__.py b/kallithea/lib/auth_modules/__init__.py --- a/kallithea/lib/auth_modules/__init__.py +++ b/kallithea/lib/auth_modules/__init__.py @@ -417,6 +417,7 @@ def authenticate(username, password, env return plugin_user # we failed to Auth because .auth() method didn't return proper the user - log.warning("User `%s` failed to authenticate against %s" - % (username, plugin.__module__)) + if username: + log.warning("User `%s` failed to authenticate against %s" + % (username, plugin.__module__)) return None