mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
fix(core): Rate limit MFA activation and verification endpoints (#10330)
This commit is contained in:
committed by
GitHub
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;
|
||||
|
||||
Reference in New Issue
Block a user