FRE-5398: Fix invoice endpoint customer IDOR (M-3)

- Make verifyCustomerOwnership public in BillingService
- Add ownership verification before fetching invoice history
- Returns 403 if customerId does not belong to authenticated user

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
2026-05-16 09:57:57 -04:00
parent d6f574ff8e
commit 9f65ebce5d
2 changed files with 11 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ export class BillingService {
}
}
private async verifyCustomerOwnership(
async verifyCustomerOwnership(
customerId: string,
userId: string
): Promise<void> {