From b6070a3a7acfd4184d08065658b741d3aff48715 Mon Sep 17 00:00:00 2001 From: Supertiger Date: Wed, 22 Jan 2025 18:20:00 +0000 Subject: [PATCH] fix crash --- src/routes/servers/serverTransferOwnership.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/routes/servers/serverTransferOwnership.ts b/src/routes/servers/serverTransferOwnership.ts index a8a89db..16ca2e4 100644 --- a/src/routes/servers/serverTransferOwnership.ts +++ b/src/routes/servers/serverTransferOwnership.ts @@ -13,6 +13,8 @@ export function serverTransferOwnership(Router: Router) { authenticate({ allowBot: true }), serverMemberVerification(), body('password').isLength({ min: 0, max: 72 }).withMessage('Password must be between 0 and 72 characters long.').isString().withMessage('Password must be a string!').not().isEmpty().withMessage('Password is required'), + body('newOwnerUserId').isString().withMessage('newOwnerUserId must be a string.').isLength({ min: 4, max: 100 }).withMessage('newOwnerUserId must be between 4 and 100 characters long.').not().isEmpty().withMessage('newOwnerUserId is required'), + rateLimit({ name: 'server_transfer_ownership', restrictMS: 20000,