From e87bebc3a3bd3b9408aca527b374f703c980070b Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sun, 30 May 2021 01:44:46 +0200 Subject: :sparkles: avatars + attachments --- src/routes/external.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/routes/external.ts') diff --git a/src/routes/external.ts b/src/routes/external.ts index 2f8de5d9..dcf56c8c 100644 --- a/src/routes/external.ts +++ b/src/routes/external.ts @@ -30,6 +30,8 @@ const DEFAULT_FETCH_OPTIONS: any = { }; router.post("/", bodyParser.json(), async (req, res) => { + if (req.headers.signature !== Config.get().security.requestSignature) + throw new HTTPError("Invalid request signature"); if (!req.body) throw new HTTPError("Invalid Body"); const { url } = req.body; if (!url || typeof url !== "string") throw new HTTPError("Invalid url"); -- cgit 1.5.1