Skip to content

fix: add authentication to candles endpoint#15

Open
FuturMix wants to merge 1 commit into
profullstack:masterfrom
FuturMix:fix/candles-auth
Open

fix: add authentication to candles endpoint#15
FuturMix wants to merge 1 commit into
profullstack:masterfrom
FuturMix:fix/candles-auth

Conversation

@FuturMix

Copy link
Copy Markdown

Fixes #13

Bug

GET /api/candles has no authentication check. Every other API route in the codebase calls authenticate(req) from @/lib/api-auth, but this endpoint was missed. This allows unauthenticated access to market data and potential rate-limit abuse against upstream exchange APIs.

Fix

Added the standard authenticate(req) + unauthorized() pattern matching all other protected endpoints.

Fixes profullstack#13

GET /api/candles had no authentication check, unlike every other API
endpoint which calls authenticate(req). This allowed unauthenticated
access to market data and potential abuse of upstream exchange APIs.

Added the standard authenticate(req) + unauthorized() pattern.
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.

Bug: Candles endpoint missing authentication

1 participant