Closed code423n4 closed 2 years ago
Fitraldys
There is missing check on newOner and owner, the current owner might accidentally update the new owner to the same address as owner.
https://github.com/code-423n4/2022-01-notional/blob/main/contracts/utils/BoringOwnable.sol#L21
require(newOwner != owner);
There is no negative effect of this.
It will be just wasted gas for a useless tx at worst.
Handle
Fitraldys
Vulnerability details
Impact
There is missing check on newOner and owner, the current owner might accidentally update the new owner to the same address as owner.
Proof of Concept
https://github.com/code-423n4/2022-01-notional/blob/main/contracts/utils/BoringOwnable.sol#L21
Recommended Mitigation Steps
require(newOwner != owner);