Open code423n4 opened 3 years ago
0xRajeev
The error message string for the require statement on L153 of LoanFactory.sol incorrectly uses PoolFactory as the source contract for this message instead of LoanFactory, which could be confusing when this error is hit.
require(msg.sender == globals.governor(), "PoolFactory:INVALID_GOVERNOR");
https://github.com/maple-labs/maple-core/blob/355141befa89c7623150a83b7d56a5f5820819e9/contracts/LoanFactory.sol#L153
Manual Analysis
Change error message to: require(msg.sender == globals.governor(), “LoanFactory:INVALID_GOVERNOR");
Informational, will address
Handle
0xRajeev
Vulnerability details
Impact
The error message string for the require statement on L153 of LoanFactory.sol incorrectly uses PoolFactory as the source contract for this message instead of LoanFactory, which could be confusing when this error is hit.
require(msg.sender == globals.governor(), "PoolFactory:INVALID_GOVERNOR");
Proof of Concept
https://github.com/maple-labs/maple-core/blob/355141befa89c7623150a83b7d56a5f5820819e9/contracts/LoanFactory.sol#L153
Tools Used
Manual Analysis
Recommended Mitigation Steps
Change error message to: require(msg.sender == globals.governor(), “LoanFactory:INVALID_GOVERNOR");