sherlock-audit / 2023-09-Gitcoin-judging

11 stars 7 forks source link

pontifex - RFPSimpleStrategy: `setPoolActive` is not protected #946

Closed sherlock-admin closed 1 year ago

sherlock-admin commented 1 year ago

pontifex

medium

RFPSimpleStrategy: setPoolActive is not protected

Any user can call the setPoolActive and change poolActive flag but should not be allowed. So any user can call the setPoolActive and change poolActive flag.

Vulnerability Detail

The setPoolActive function is not protected but 'msg.sender' must be a pool manager to close the pool.

Impact

Any user can call the setPoolActive and change poolActive flag. This can temporary broke the contract functionality.

Code Snippet

https://github.com/sherlock-audit/2023-09-Gitcoin/blob/6430c8004017e96ae2f5aac365bdefd0b6eeea72/allo-v2/contracts/strategies/rfp-simple/RFPSimpleStrategy.sol#L216-L222

Tool used

Manual Review

Recommendation

Consider adding a corresponding modifier.