Skip to content

Commit 9b44ef8

Browse files
committed
feat: add throttling to password reset request endpoint
1 parent 7bbbe0a commit 9b44ef8

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

backend/src/entities/user/user.controller.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ export class UserController {
297297
description: 'Password reset requested.',
298298
type: OperationResultMessageDs,
299299
})
300+
@Throttle({ default: { limit: isTest() ? 200 : 5, ttl: 60000 } })
300301
@Post('user/password/reset/request/')
301302
async askResetUserPassword(@Body() emailData: RequestRestUserPasswordDto): Promise<OperationResultMessageDs> {
302303
return await this.requestResetUserPasswordUseCase.execute(emailData, InTransactionEnum.ON);

0 commit comments

Comments
 (0)