Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Anyone can override the handler records. #415

Closed
0xdcota opened this issue Mar 28, 2023 · 0 comments · Fixed by #419
Closed

Anyone can override the handler records. #415

0xdcota opened this issue Mar 28, 2023 · 0 comments · Fixed by #419
Assignees
Labels
Bug Something isn't working Smart Contracts
Milestone

Comments

@0xdcota
Copy link
Contributor

0xdcota commented Mar 28, 2023

[H-5] Anyone can override the handler records using the same trasnferId and failing bundle

Description

If try this.xBundle(actions, args) fails inside xReceive of the router, and the contract has dormant funds; a record is made inside the handler in the name of transferId, and funds are transferred there.

However, since anyone can call xReceive, one can call it with the same transferId later, make the bundle fail on purpose, and override the content inside the handler.

Remediation

Consider quering connext to check if the transferId passed is already processed.

@0xdcota 0xdcota self-assigned this Mar 28, 2023
@0xdcota 0xdcota added Bug Something isn't working Smart Contracts labels Mar 28, 2023
@0xdcota 0xdcota added this to the Fuji-v2 MVP milestone Mar 28, 2023
@0xdcota 0xdcota linked a pull request Mar 30, 2023 that will close this issue
@0xdcota 0xdcota closed this as completed May 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Smart Contracts
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant