From e31965abb35dcf0f6fb58cbfa6e6d8a4408de058 Mon Sep 17 00:00:00 2001 From: Fabrice Mouhartem Date: Tue, 28 Nov 2023 11:11:59 +0100 Subject: [PATCH] Keypair not initialised correctly in the answers channel - Bug introduced in #1316 to fix #1261 - Was an issue when creating a new form (impossible to answer), however importing a template fixed it. - priv should stay in the scope of initializeAnswers() and not leak --- www/form/inner.js | 1 + 1 file changed, 1 insertion(+) diff --git a/www/form/inner.js b/www/form/inner.js index 36747e44d..c7b66a7d9 100644 --- a/www/form/inner.js +++ b/www/form/inner.js @@ -4519,6 +4519,7 @@ define([ if (!APP.isEditor) { return; } if (content.answers && content.answers.channel && content.answers.publicKey && content.answers.validateKey) { return; } // Don't override other settings (anonymous, makeAnonymous, etc.) from templates + var priv = metadataMgr.getPrivateData(); content.answers = content.answers || {}; content.answers.channel = Hash.createChannelId(); content.answers.publicKey = priv.form_public;