From 62bc1d2af69b83f42b42f16aa98b319d5df0bd44 Mon Sep 17 00:00:00 2001 From: Sean Kavanagh Date: Sun, 13 Feb 2022 11:18:27 -0500 Subject: [PATCH] Fixed syntax issue with h2 upgrade --- src/main/java/io/bastillion/manage/db/PublicKeyDB.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/bastillion/manage/db/PublicKeyDB.java b/src/main/java/io/bastillion/manage/db/PublicKeyDB.java index 387285a6..a45e0906 100755 --- a/src/main/java/io/bastillion/manage/db/PublicKeyDB.java +++ b/src/main/java/io/bastillion/manage/db/PublicKeyDB.java @@ -421,7 +421,7 @@ public static boolean isKeyRegistered(Long userId, PublicKey publicKey) throws S boolean isDuplicate = false; Connection con = DBUtils.getConn(); - PreparedStatement stmt = con.prepareStatement("select * from public_keys where user_id=? and fingerprint like ? and profile_id is ? and id is not ?"); + PreparedStatement stmt = con.prepareStatement("select * from public_keys where user_id=? and fingerprint like ? and profile_id = ? and id <> ?"); stmt.setLong(1, userId); stmt.setString(2, SSHUtil.getFingerprint(publicKey.getPublicKey())); if (publicKey.getProfile() != null && publicKey.getProfile().getId() != null) {