From cf1606884a08cf3ea28cbab700e057fcb14bb645 Mon Sep 17 00:00:00 2001 From: Flummi Date: Mon, 28 Mar 2022 16:34:45 +0200 Subject: [PATCH] 405 :( --- src/inc/routes/apiv2/index.mjs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/inc/routes/apiv2/index.mjs b/src/inc/routes/apiv2/index.mjs index 39ec60a..a7e1cd0 100644 --- a/src/inc/routes/apiv2/index.mjs +++ b/src/inc/routes/apiv2/index.mjs @@ -102,6 +102,12 @@ export default router => { const tagname = decodeURIComponent(req.params.tagname); const newtag = req.post.newtag; + if(['sfw', 'nsfw'].includes(tagname) || ['sfw', 'nsfw'].includes(newtag)) { + return res.json({ + msg: 'f0ck you' + }, 405); // method not allowed + } + const tmptag = ( await sql('tags') .where('tag', tagname)