From 81583ac83a13e1cf321494bfb50595a961dffa59 Mon Sep 17 00:00:00 2001 From: James Moger Date: Thu, 17 Apr 2014 22:19:30 -0400 Subject: [PATCH] [findbugs] Simplify the SshKey <-> PublicKey comparison --- .../gitblit/transport/ssh/CachingPublicKeyAuthenticator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/gitblit/transport/ssh/CachingPublicKeyAuthenticator.java b/src/main/java/com/gitblit/transport/ssh/CachingPublicKeyAuthenticator.java index 9974d261..e804a0da 100644 --- a/src/main/java/com/gitblit/transport/ssh/CachingPublicKeyAuthenticator.java +++ b/src/main/java/com/gitblit/transport/ssh/CachingPublicKeyAuthenticator.java @@ -83,7 +83,7 @@ public class CachingPublicKeyAuthenticator implements PublickeyAuthenticator, Se for (SshKey key : keys) { log.debug("auth compare to {}", key.getFingerprint()); - if (key.equals(suppliedKey)) { + if (key.getPublicKey().equals(suppliedKey)) { UserModel user = authManager.authenticate(username, key); if (user != null) { client.setUser(user); -- 2.39.5