From 8a8bc2bebe094e7b8eb8b2311fadcac984f60969 Mon Sep 17 00:00:00 2001 From: Isaac Date: Sun, 30 Jul 2023 01:04:42 +0100 Subject: [PATCH] =?UTF-8?q?fix(=F0=9F=9A=A8=20security):=20being=20able=20?= =?UTF-8?q?to=20close=20tickets=20from=20other=20servers=20(closes=20#466)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands/slash/force-close.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/commands/slash/force-close.js b/src/commands/slash/force-close.js index 261a34c..977c063 100644 --- a/src/commands/slash/force-close.js +++ b/src/commands/slash/force-close.js @@ -139,6 +139,7 @@ module.exports = class ForceCloseSlashCommand extends SlashCommand { const tickets = await client.prisma.ticket.findMany({ where: { categoryId: categoryId ?? undefined, // must be undefined not null + guildId: interaction.guild.id, lastMessageAt: { lte: new Date(Date.now() - time) }, open: true, },