From 691f641df6628425b6b9135e58613b451e8ce9db Mon Sep 17 00:00:00 2001 From: eo-uk Date: Thu, 19 Oct 2023 17:05:24 +0100 Subject: [PATCH] fixed fetch route crashing the server --- mod/fetch.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/mod/fetch.js b/mod/fetch.js index 4ed1614120..cbb8d4ab5f 100644 --- a/mod/fetch.js +++ b/mod/fetch.js @@ -1,5 +1,10 @@ module.exports = async (req, res) => { + if (!req.options?.template) { + res.status(400).send(); + return; + } + const template = req.options.template if (typeof template.options.body !== 'string') {