Project.raiseDispute()
doesn't use approvedHashes - meaning users who use contracts can't raise disputes
#340
Labels
2 (Med Risk)
Assets not at direct risk, but function/availability of the protocol could be impacted or leak value
bug
Something isn't working
sponsor confirmed
Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
valid
Lines of code
https://github.com/code-423n4/2022-08-rigor/blob/5ab7ea84a1516cb726421ef690af5bc41029f88f/contracts/Project.sol#L493-L536
Vulnerability details
Impact
In case users are using a contract (like a multisig wallet) to interact with a project, they can't raise a dispute.
The sponsors have added the
approveHash()
function to support users who wish to use contracts as builder/GC/SC. However, theProject.raiseDispute()
function doesn't check them, meaning if any of those users wish to raise a dispute they can't do it.Proof of Concept
I've modified the following test, trying to use an approved hash. The test failed.
Recommended Mitigation Steps
Make
raiseDispute()
to check for approvedHashes tooThe text was updated successfully, but these errors were encountered: