Skip to content

Fix/json body limit and jwt exp validation#940

Open
Litezy wants to merge 2 commits into
LabsCrypt:mainfrom
Litezy:fix/json-body-limit-and-jwt-exp-validation
Open

Fix/json body limit and jwt exp validation#940
Litezy wants to merge 2 commits into
LabsCrypt:mainfrom
Litezy:fix/json-body-limit-and-jwt-exp-validation

Conversation

@Litezy

@Litezy Litezy commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Closes #826
Closes #827

Summary

  • Set an explicit 1mb limit on express.json() in app.ts — documents
    intent and caps the JSON-parse DoS surface (was silently defaulting to 100 kb).
  • Guard payload.exp in verifyJwt with a typeof check before the
    numeric comparison — previously a signature-valid token with no exp field
    evaluated undefined < number → false and was accepted forever.

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

Labels

None yet

Projects

None yet

1 participant