From 4a0337bdada221be8b982ff959fc1253ef423231 Mon Sep 17 00:00:00 2001 From: william Murphy Date: Wed, 25 Dec 2019 15:52:15 -0600 Subject: [PATCH] Add check for delete user broadcasts for unknown users (unverifiable signature) --- net/security.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/net/security.js b/net/security.js index 6e25e1c..f5005b5 100644 --- a/net/security.js +++ b/net/security.js @@ -35,7 +35,11 @@ async function verifySignature (req, res, next) { } next() } catch (err) { - console.log('error during signature verification', err.message) + if (req.body.type === 'Delete' && err.mesage.startsWith('410')) { + // user delete message that can't be verified because we don't have the user cached + res.status(200).send() + } + console.log('error during signature verification', err.message, req.body) return res.status(500).send() } }