Skip to content

Commit a176bb7

Browse files
committed
feat: Add validation for offset and limit in PostService
1 parent 14afa1b commit a176bb7

File tree

1 file changed

+1
-1
lines changed
  • apps/server/src/services/PostService

1 file changed

+1
-1
lines changed

apps/server/src/services/PostService/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ export class PostService implements Service {
258258
throw new BadRequestError('Invalid timeframe')
259259
}
260260

261-
if (timeframe === 'year' && offset > 1000) {
261+
if (timeframe === 'year' && (offset > 1000 || limit > 20)) {
262262
console.log('Detected GraphQL Abuse', ip)
263263
return []
264264
}

0 commit comments

Comments
 (0)