| // Yes, enabled, check for concurrent login attempt Authentication authentication = event.getAuthentication(); String name = getUserName(authentication); if (name == null) { LOGGER.warning( "Brute force attack prevention enabled, but Spring Authentication " + "does not provide a user name, skipping: " + authentication); } // do we have a delayed login in flight already? If so, kill this login attempt // no matter if successful or not final AtomicInteger counter = delayedUsers.get(name); If the username is null, the log message says to skip doing anything for this authentication, but the BruteForceListener goes on anyway, resulting in a NullPointerException thrown from the attempt to look up the username in the 'delayedUsers' ConcurrentHashMap. Better to put an 'else' statement after the 'if (name == null)' block, I assume. |