diff --git a/server/keys.js b/server/keys.js index 8a04f08..b3b2476 100644 --- a/server/keys.js +++ b/server/keys.js @@ -29,7 +29,7 @@ more information on this, and how to apply and follow the GNU AGPL, see { reject(new Error(`No public keys could be fetched using WKD`)) } - if (c) { + if (c && plaintext instanceof Uint8Array) { await c.set(hash, plaintext.toString(), 60 * 1000) } } @@ -147,7 +147,7 @@ const fetchHKP = (id, keyserverDomain) => { reject(new Error(`No public keys could be fetched using HKP`)) } - if (c) { + if (c && output.publicKey instanceof PublicKey) { await c.set(hash, output.publicKey.armor(), 60 * 1000) }