From ebaedf985c2992d8b0e43d9699e28e2a9dce2622 Mon Sep 17 00:00:00 2001 From: Rik Smale Date: Fri, 22 Oct 2021 19:57:38 +0200 Subject: [PATCH] fix(events): disallow updating picture in some cases (#608) --- lib/events.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/events.js b/lib/events.js index 00216bf7..5e0fda07 100644 --- a/lib/events.js +++ b/lib/events.js @@ -126,6 +126,7 @@ exports.addEvent = async (req, res) => { // Make sure the user doesn't insert malicious stuff const data = req.body; delete data.id; + delete data.image; delete data.status; delete data.deleted; @@ -199,6 +200,7 @@ exports.editEvent = async (req, res) => { const event = req.event; delete data.id; + delete data.image; delete data.status; delete data.deleted;