Skip to content

fix: add missing rate limiting to 5 server actions (#359)#367

Open
saurabhhhcodes wants to merge 1 commit into
Coder-s-OG-s:mainfrom
saurabhhhcodes:fix/rate-limit-missing-actions-359
Open

fix: add missing rate limiting to 5 server actions (#359)#367
saurabhhhcodes wants to merge 1 commit into
Coder-s-OG-s:mainfrom
saurabhhhcodes:fix/rate-limit-missing-actions-359

Conversation

@saurabhhhcodes

Copy link
Copy Markdown
Contributor

Closes #359

Summary

Five server actions were missing rateLimit() calls while neighboring functions in the same files had them. Added rate limiting to:

Action File Limit
getCommunityLinks maintainer.ts 60 req/min
getCurrentStreak streak.ts 60 req/min
getPublicStreak streak.ts 120 req/min
getUsage usage.ts 60 req/min
acknowledgeLevelUp level-ups.ts 30 req/min

Type of Change

  • Bug fix

Checklist

  • My code follows the project structure and conventions
  • npm run typecheck — passes
  • npm run lint — passes (only pre-existing warning in issues-list.tsx)
  • npm run format:check — passes

getCommunityLinks, getCurrentStreak, getPublicStreak, getUsage,
and acknowledgeLevelUp were all missing rateLimit() calls while
neighboring functions in the same files had them.

- getCommunityLinks: 60 req/min (maint:community-links)
- getCurrentStreak: 60 req/min (streak:current)
- getPublicStreak: 120 req/min (streak:public, uses userId or anon key)
- getUsage: 60 req/min (usage:get)
- acknowledgeLevelUp: 30 req/min (level-ups:acknowledge, write op)

Non-Result functions return empty values when rate limited.
Result functions return err('rate_limited').
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the codersogs-3057's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Ayush-Patel-56

Copy link
Copy Markdown
Collaborator

CI is failing, can you please fix it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Several maintainer and profile actions have no rate limiting

2 participants