]> source.dussan.org Git - gitblit.git/commitdiff
[findbugs] Simplify the SshKey <-> PublicKey comparison
authorJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 02:19:30 +0000 (22:19 -0400)
committerJames Moger <james.moger@gitblit.com>
Fri, 18 Apr 2014 03:08:07 +0000 (23:08 -0400)
src/main/java/com/gitblit/transport/ssh/CachingPublicKeyAuthenticator.java

index 9974d261c94efb1afc18a8a50b551bec03a17af9..e804a0da646197d7b8f973c9009c0ae5b04aaa41 100644 (file)
@@ -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);