summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-05-06 19:31:49 +0200
committerRory& <root@rory.gay>2026-05-06 19:31:49 +0200
commit1e99ed9e5718e764ca043d16909c26cd4545b88e (patch)
tree80196d9eff7078940ee0a765bc8eb5d888a44648
parentSecurity: make sure the security key matches up with the user by last TOTP ti... (diff)
downloadserver-ts-1e99ed9e5718e764ca043d16909c26cd4545b88e.tar.xz
Security: ensure that a bot user is infact a bot when requesting a token reset
-rw-r--r--src/api/routes/applications/#application_id/bot/index.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/routes/applications/#application_id/bot/index.ts b/src/api/routes/applications/#application_id/bot/index.ts

index a5eb3127..c25649bb 100644 --- a/src/api/routes/applications/#application_id/bot/index.ts +++ b/src/api/routes/applications/#application_id/bot/index.ts
@@ -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;