Dariusz Bywalec
2016-01-04 5274e12c7cc19451355082418f78004c4d97e263
Fix authentication failure warning log messages for FEDERATION_USER

The AuthenticationManager did not encounter for FEDERATION_USER and would unnecessarily
generate a lot of failure warning log messages, e.g:

Failed login attempt for $gitblit, invalid credentials from XXX.XX.XX.XX

A simple condition will prematurely return null bypassing the regular authentication path
and immediately make the authentication be routed via FederationManager.
1 files modified
6 ■■■■■ changed files
src/main/java/com/gitblit/manager/AuthenticationManager.java 6 ●●●●● patch | view | raw | blame | history
src/main/java/com/gitblit/manager/AuthenticationManager.java
@@ -466,6 +466,12 @@
            return null;
        }
        if (username.equalsIgnoreCase(Constants.FEDERATION_USER)) {
            // can not authenticate internal FEDERATION_USER at this point
            // it must be routed to FederationManager
            return null;
        }
        String usernameDecoded = StringUtils.decodeUsername(username);
        String pw = new String(password);
        if (StringUtils.isEmpty(pw)) {