Security: ensure that a bot user is infact a bot when requesting a token reset

This commit is contained in:
Rory&
2026-05-06 19:31:49 +02:00
parent f89ee5e24a
commit 1e99ed9e57
@@ -66,7 +66,7 @@ router.post(
},
}),
async (req: Request, res: Response) => {
const bot = await User.findOneOrFail({ where: { id: req.params.application_id as string } });
const bot = await User.findOneOrFail({ where: { id: req.params.application_id as string, bot: true } });
const owner = req.user;
if (owner.id != req.user_id) throw DiscordApiErrors.ACTION_NOT_AUTHORIZED_ON_APPLICATION;