Closed code423n4 closed 1 year ago
https://github.com/code-423n4/2023-05-maia/blob/54a45beb1428d85999da3f721f923cbf36ee3d35/src/maia/factories/PartnerManagerFactory.sol#L57-L73
The lines of affected code are using the equality operator instead of the assignment operator.
e.g. line 61
partnerIds[newPartnerManager] == id;
e.g line 70
vaultIds[newVault] == id;
/// @inheritdoc IPartnerManagerFactory function addPartner(PartnerManager newPartnerManager) external onlyOwner { uint256 id = partners.length; partners.push(newPartnerManager); partnerIds[newPartnerManager] == id; emit AddedPartner(newPartnerManager, id); } /// @inheritdoc IPartnerManagerFactory function addVault(IBaseVault newVault) external onlyOwner { uint256 id = vaults.length; vaults.push(newVault); vaultIds[newVault] == id; emit AddedVault(newVault, id); }
VS Code + Mythx
Change the following from "==" to "=": e.g. line 61
partnerIds[newPartnerManager] = id;
vaultIds[newVault] = id;
Invalid Validation
Withdrawn by debo
Lines of code
https://github.com/code-423n4/2023-05-maia/blob/54a45beb1428d85999da3f721f923cbf36ee3d35/src/maia/factories/PartnerManagerFactory.sol#L57-L73
Vulnerability details
Impact
The lines of affected code are using the equality operator instead of the assignment operator.
e.g. line 61
e.g line 70
Proof of Concept
Tools Used
VS Code + Mythx
Recommended Mitigation Steps
Change the following from "==" to "=": e.g. line 61
e.g line 70
Assessed type
Invalid Validation