Paul Martin
2016-04-27 c2188a840bc4153ae92112b04b2e06a90d3944aa
src/main/java/com/gitblit/transport/ssh/UsernamePasswordAuthenticator.java
@@ -17,7 +17,7 @@
import java.util.Locale;
import org.apache.sshd.server.PasswordAuthenticator;
import org.apache.sshd.server.auth.password.PasswordAuthenticator;
import org.apache.sshd.server.session.ServerSession;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -26,6 +26,8 @@
import com.gitblit.models.UserModel;
/**
 *
 * Authenticates an SSH session with username/password credentials.
 *
 * @author James Moger
 *
@@ -49,13 +51,13 @@
      }
      username = username.toLowerCase(Locale.US);
      UserModel user = authManager.authenticate(username, password.toCharArray());
      UserModel user = authManager.authenticate(username, password.toCharArray(), null);
      if (user != null) {
         client.setUser(user);
         return true;
      }
      log.warn("could not authenticate {} for SSH using the supplied password", username);
      log.warn("could not authenticate {} ({}) for SSH using the supplied password", username, client.getRemoteAddress());
      return false;
   }
}