Skip to content

feat(security): add query limits middleware closes #533#575

Open
Rocket1960 wants to merge 1 commit into
Gatheraa:mainfrom
Rocket1960:fix/backend-security-clean
Open

feat(security): add query limits middleware closes #533#575
Rocket1960 wants to merge 1 commit into
Gatheraa:mainfrom
Rocket1960:fix/backend-security-clean

Conversation

@Rocket1960

Copy link
Copy Markdown
Contributor

Adds queryLimits Express middleware that enforces configurable caps on query string length and filter complexity (OR clause count, AND nesting depth) to protect database resources from expensive or malicious queries.

  • src/config/queryLimits.ts – config interface + env-var-driven defaults
  • src/middleware/queryLimits.ts – middleware implementation
  • src/app.ts / server.ts / routers – wiring for search, referrals, booking
  • tests/queryLimits.test.ts – unit tests
  • docs/api/query-limits.md – endpoint + configuration reference

A new pull request which addresses the maintainers request
closes issue #533

Adds queryLimits Express middleware that enforces configurable caps on
query string length and filter complexity (OR clause count, AND nesting
depth) to protect database resources from expensive or malicious queries.

- src/config/queryLimits.ts  – config interface + env-var-driven defaults
- src/middleware/queryLimits.ts – middleware implementation
- src/app.ts / server.ts / routers – wiring for search, referrals, booking
- tests/queryLimits.test.ts – unit tests
- docs/api/query-limits.md – endpoint + configuration reference
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