Problem
The transaction history endpoint is vulnerable to an IDOR (Insecure Direct Object Reference) issue.
A logged-in user can modify the URL (e.g., /history/bob) and access another user's private transaction history.
This exposes sensitive financial data and violates user privacy.
Points: 30
Steps to Reproduce
- Log in as User A.
- Navigate to their own transaction history endpoint.
- Manually modify the URL to another user's identifier (e.g.,
/history/bob or /history/<AnotherUserID>).
- Notice:
- User A is able to view User B’s private transaction history.
- No authorization check is performed to ensure the requester owns the history being requested.
Expected Behavior
The endpoint should enforce strict authorization checks, ensuring:
- The authenticated user's ID matches the ID in the requested history.
- Users cannot view anyone else's financial activity.
- If a mismatch is detected, the server should return a
403 Forbidden response.
Submission Guidelines
- Comment on this issue with your proposed solution approach.
- Wait for issue assignment from reviewers.
- Create a PR with clear, descriptive commit messages.
- Reference this issue in your PR description.