Skip to content

fix: add provider auth to add_continuous_balance (#45) - #46

Open
leanworld7-netizen wants to merge 1 commit into
EquipChain:mainfrom
leanworld7-netizen:fix/add-continuous-balance-auth-45
Open

fix: add provider auth to add_continuous_balance (#45)#46
leanworld7-netizen wants to merge 1 commit into
EquipChain:mainfrom
leanworld7-netizen:fix/add-continuous-balance-auth-45

Conversation

@leanworld7-netizen

Copy link
Copy Markdown

Fix for #45: add_continuous_balance zero auth

Changes

Added flow.provider.require_auth() to add_continuous_balance before calling add_balance_to_flow.

Root Cause

add_continuous_balance (L5506) delegates to add_balance_to_flow (L2817) with no authorization check. Any caller can inflate any stream balance.

Fix

Added provider auth check before the balance addition call:
let flow = get_continuous_flow_or_panic(&env, stream_id);
flow.provider.require_auth();

Severity

CRITICAL - per SECURITY.md section 4.1, Critical = $10K-$50K bounty.

Requesting review from @KarenZita01.

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