diff --git a/packages/pds/src/api/com/atproto/server/requestAccountDelete.ts b/packages/pds/src/api/com/atproto/server/requestAccountDelete.ts index 46ba4f8c50d..8cd5d614127 100644 --- a/packages/pds/src/api/com/atproto/server/requestAccountDelete.ts +++ b/packages/pds/src/api/com/atproto/server/requestAccountDelete.ts @@ -1,5 +1,5 @@ import { InvalidRequestError } from '@atproto/xrpc-server' -import { DAY } from '@atproto/common' +import { DAY, HOUR } from '@atproto/common' import { Server } from '../../../../lexicon' import AppContext from '../../../../context' @@ -8,7 +8,12 @@ export default function (server: Server, ctx: AppContext) { rateLimit: [ { durationMs: DAY, - points: 10, + points: 15, + calcKey: ({ auth }) => auth.credentials.did, + }, + { + durationMs: HOUR, + points: 5, calcKey: ({ auth }) => auth.credentials.did, }, ], diff --git a/packages/pds/src/api/com/atproto/server/requestEmailConfirmation.ts b/packages/pds/src/api/com/atproto/server/requestEmailConfirmation.ts index d84718f96e1..b4cb6f366c0 100644 --- a/packages/pds/src/api/com/atproto/server/requestEmailConfirmation.ts +++ b/packages/pds/src/api/com/atproto/server/requestEmailConfirmation.ts @@ -1,5 +1,5 @@ import { InvalidRequestError } from '@atproto/xrpc-server' -import { DAY } from '@atproto/common' +import { DAY, HOUR } from '@atproto/common' import { Server } from '../../../../lexicon' import AppContext from '../../../../context' @@ -8,7 +8,12 @@ export default function (server: Server, ctx: AppContext) { rateLimit: [ { durationMs: DAY, - points: 10, + points: 15, + calcKey: ({ auth }) => auth.credentials.did, + }, + { + durationMs: HOUR, + points: 5, calcKey: ({ auth }) => auth.credentials.did, }, ], diff --git a/packages/pds/src/api/com/atproto/server/requestEmailUpdate.ts b/packages/pds/src/api/com/atproto/server/requestEmailUpdate.ts index a1e52a90be6..a604b96baf2 100644 --- a/packages/pds/src/api/com/atproto/server/requestEmailUpdate.ts +++ b/packages/pds/src/api/com/atproto/server/requestEmailUpdate.ts @@ -1,5 +1,5 @@ import { InvalidRequestError } from '@atproto/xrpc-server' -import { DAY } from '@atproto/common' +import { DAY, HOUR } from '@atproto/common' import { Server } from '../../../../lexicon' import AppContext from '../../../../context' @@ -8,7 +8,12 @@ export default function (server: Server, ctx: AppContext) { rateLimit: [ { durationMs: DAY, - points: 10, + points: 15, + calcKey: ({ auth }) => auth.credentials.did, + }, + { + durationMs: HOUR, + points: 5, calcKey: ({ auth }) => auth.credentials.did, }, ], diff --git a/packages/pds/src/api/com/atproto/server/requestPasswordReset.ts b/packages/pds/src/api/com/atproto/server/requestPasswordReset.ts index 8a8006dc62b..d5fb4333a58 100644 --- a/packages/pds/src/api/com/atproto/server/requestPasswordReset.ts +++ b/packages/pds/src/api/com/atproto/server/requestPasswordReset.ts @@ -1,4 +1,4 @@ -import { DAY } from '@atproto/common' +import { DAY, HOUR } from '@atproto/common' import AppContext from '../../../../context' import { Server } from '../../../../lexicon' @@ -7,7 +7,12 @@ export default function (server: Server, ctx: AppContext) { rateLimit: [ { durationMs: DAY, - points: 10, + points: 15, + calcKey: ({ input }) => input.body.email.toLowerCase(), + }, + { + durationMs: HOUR, + points: 5, calcKey: ({ input }) => input.body.email.toLowerCase(), }, ],