From eea0688879dcc12250be27eec5c1612d4744390a Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 31 May 2021 15:53:55 +0530 Subject: [PATCH] log messages which fail signature validation --- lib/hk-util.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/hk-util.js b/lib/hk-util.js index 5a96970d0..276ac3e6f 100644 --- a/lib/hk-util.js +++ b/lib/hk-util.js @@ -963,7 +963,11 @@ HK.onChannelMessage = function (Env, Server, channel, msgStruct, cb) { // validation can fail in multiple ways if (err === 'FAILED') { // we log this case, but not others for some reason - Log.info("HK_SIGNED_MESSAGE_REJECTED", 'Channel '+channel.id); + Log.info("HK_SIGNED_MESSAGE_REJECTED", { + channel: channel.id, + validateKey: metadata.validayKey, + message: signedMsg, + }); } // always abort if there was an error... cb('FAILED_VALIDATION');