This repository has been archived by the owner on May 26, 2023. It is now read-only.
chaduke - getSupportingDocumentsComplete()
might return claimIds
who have actually not completed their supporting documents
#151
Labels
Duplicate
A valid issue that is a duplicate of an issue with `Has Duplicates` label
Low/Info
A valid Low/Informational severity issue
Non-Reward
This issue will not receive a payout
Sponsor Confirmed
The sponsor acknowledged this issue is valid
Will Fix
The sponsor confirmed this issue will be fixed
chaduke
medium
getSupportingDocumentsComplete()
might returnclaimIds
who have actually not completed their supporting documentsSummary
getSupportingDocumentsComplete()
might returnclaimIds
who have actually not completed their supporting documents.Vulnerability Detail
getSupportingDocumentsComplete()
might returnclaimIds
who have actually not completed their supporting documents becausesetSupportingDocumentsComplete()
will push the_claimID
to the list even when_supportingDocumentsComplete == false
.https://github.com/sherlock-audit/2023-02-openq/blob/main/contracts/Bounty/Implementations/OngoingBountyV1.sol#L188-L198
As a result,
getSupportingDocumentsComplete()
will return a listclaimIds
including some that have not actually completed their supporting documents.Impact
getSupportingDocumentsComplete()
will return a listclaimIds
including some that have not actually completed their supporting documents.Code Snippet
Remix
Tool used
Manual Review
Recommendation
Only push the
_claimId
only when_supportingDocumentsComplete == true
.function setSupportingDocumentsComplete(bytes calldata _data) external onlyOpenQ { (bytes32 _claimId, bool _supportingDocumentsComplete) = abi.decode( _data, (bytes32, bool) ); supportingDocumentsComplete[_claimId] = _supportingDocumentsComplete; + if( _supportingDocumentsComplete) supportingDocumentsCompleteClaimIds.push(_claimId); }
Duplicate of #425
The text was updated successfully, but these errors were encountered: