Skip to content

Commit

Permalink
fix(core): Rate limit MFA verification endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
netroy committed Aug 8, 2024
1 parent ee03400 commit f330449
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/cli/src/controllers/mfa.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export class MFAController {
};
}

@Post('/enable')
@Post('/enable', { rateLimit: true })
async activateMFA(req: MFA.Activate) {
const { token = null } = req.body;
const { id, mfaEnabled } = req.user;
Expand Down Expand Up @@ -78,7 +78,7 @@ export class MFAController {
await this.mfaService.disableMfa(id);
}

@Post('/verify')
@Post('/verify', { rateLimit: true })
async verifyMFA(req: MFA.Verify) {
const { id } = req.user;
const { token } = req.body;
Expand Down

0 comments on commit f330449

Please sign in to comment.