rate limit all password checks - fixes #540
all of these endpoints require the caller to already be logged in, so it's not really much of a security problem, but it's still safer to limit any endpoints that can be used to guess the current password
This commit is contained in:
parent
7dfe9087b2
commit
cced87da7f
8 changed files with 56 additions and 0 deletions
|
|
@ -13,10 +13,17 @@ import { GlobalEventService } from '@/core/GlobalEventService.js';
|
|||
import { DI } from '@/di-symbols.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
import { UserAuthService } from '@/core/UserAuthService.js';
|
||||
import ms from 'ms';
|
||||
|
||||
export const meta = {
|
||||
requireCredential: true,
|
||||
|
||||
limit: {
|
||||
duration: ms('1hour'),
|
||||
max: 10,
|
||||
minInterval: ms('1sec'),
|
||||
},
|
||||
|
||||
secure: true,
|
||||
|
||||
errors: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue