Changeset - 52bf718b30f5
[Not reviewed]
default
0 1 0
Mads Kiilerich - 11 years ago 2015-01-06 00:54:36
madski@unity3d.com
auth: don't log a message when auth without username fails - that happens all the time for basic auth and ldap
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/auth_modules/__init__.py
Show inline comments
 
@@ -408,15 +408,16 @@ def authenticate(username, password, env
 
        # from .auth() to Kallithea database. If this function returns data
 
        # then auth is correct.
 
        plugin_user = plugin._authenticate(user, username, password,
 
                                           plugin_settings,
 
                                           environ=environ or {})
 
        log.debug('PLUGIN USER DATA: %s' % plugin_user)
 

	
 
        if plugin_user:
 
            log.debug('Plugin returned proper authentication data')
 
            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
0 comments (0 inline, 0 general)