mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 04:47:29 -08:00
fix(core): Rate limit MFA activation and verification endpoints (#10330)
This commit is contained in:
parent
ee03400c25
commit
b6c47c0e32
|
@ -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;
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue