Skip to content

loay - #101

Open
loayelmasry745 wants to merge 2 commits into
Advanced-Computer-Lab-2026:mainfrom
loayelmasry745:fix/csrf-dos-protection
Open

loay#101
loayelmasry745 wants to merge 2 commits into
Advanced-Computer-Lab-2026:mainfrom
loayelmasry745:fix/csrf-dos-protection

Conversation

@loayelmasry745

Copy link
Copy Markdown
  • CSRF: csrf-csrf double-submit tokens bound to the auth session. GET /api/csrf-token issues a token; every state-changing request must send it in x-csrf-token or gets 403. Safe methods and login/register are exempt.
  • DoS: express-rate-limit on the maintenance routes (30 req/min per client, then 429).
  • Client: axios interceptor fetches, caches and attaches the token, refreshes it on session changes.
  • Add jest/babel config, CSRF + DoS tests, and a GitHub Actions workflow that runs npm test.

loayelmasry745 and others added 2 commits November 12, 2026 16:21
- CSRF: csrf-csrf double-submit tokens bound to the auth session.
  GET /api/csrf-token issues a token; every state-changing request must
  send it in x-csrf-token or gets 403. Safe methods and login/register
  are exempt.
- DoS: express-rate-limit on the maintenance routes (30 req/min per
  client, then 429).
- Client: axios interceptor fetches, caches and attaches the token,
  refreshes it on session changes.
- Add jest/babel config, CSRF + DoS tests, and a GitHub Actions workflow
  that runs npm test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant