From c84179a751da1e4bb84e7d30ff848c0d197ec6a2 Mon Sep 17 00:00:00 2001 From: Florian Zschocke Date: Wed, 16 Nov 2022 23:08:31 +0100 Subject: Fix issue with not serialisable ed25519 SSH keys Adding Ed25519 keys brings the problem that with the library currently used, the PublicKey instance of that key is not serialisable. This results in an exception when wicket tries to cache the UsersPage. So change the SshKeysPanel so that the PublicKey object is removed from the `SshKey` when the panel is detached. It can be regenerated from the raw key data. --- src/main/java/com/gitblit/transport/ssh/SshKey.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/main/java/com/gitblit/transport/ssh/SshKey.java') diff --git a/src/main/java/com/gitblit/transport/ssh/SshKey.java b/src/main/java/com/gitblit/transport/ssh/SshKey.java index 9fd1005a..cfd7310e 100644 --- a/src/main/java/com/gitblit/transport/ssh/SshKey.java +++ b/src/main/java/com/gitblit/transport/ssh/SshKey.java @@ -81,6 +81,15 @@ public class SshKey implements Serializable { return publicKey; } + public void detachPublicKey() + { + if (rawData == null) { + // Make sure the raw data is available + getRawData(); + } + publicKey = null; + } + public String getAlgorithm() { return getPublicKey().getAlgorithm(); } -- cgit v1.2.3