Questions or want to claim this? Say hi in the community chat: https://t.me/+DOylgFv1jyJlNzM0
Description
requireLoanOwner compares the caller key to itself instead of to the loan's owner, so any user can operate on any loan.
Component: Backend
Location: backend/src/middleware/loanAccess.ts -> requireLoanOwner
Severity: Critical
How to reproduce / find it
As one user, invoke an owner-only loan operation on another user's loan.
Expected behavior
The loan's stored owner must match the caller.
Notes for contributors
This is a logic/behavior defect, not a compile error. Please open one PR per fix that references this issue and names the file and function above.
Description
requireLoanOwner compares the caller key to itself instead of to the loan's owner, so any user can operate on any loan.
Component: Backend
Location:
backend/src/middleware/loanAccess.ts->requireLoanOwnerSeverity: Critical
How to reproduce / find it
As one user, invoke an owner-only loan operation on another user's loan.
Expected behavior
The loan's stored owner must match the caller.
Notes for contributors
This is a logic/behavior defect, not a compile error. Please open one PR per fix that references this issue and names the file and function above.