Core Contracts

Regnum Aurum Acquisition Corp
HardhatReal World AssetsNFT
77,280 USDC
View results
Submission Details
Severity: low
Invalid

Lack of validate newDonId in `setDonId` function

Summary

In the constructor have check condition require(_donId != "", "DON ID must be set");

But in the setDonId function don't not check this condition. So owner can set donId is empty.

Vulnerability Details

In the constructor have check condition require(_donId != "", "DON ID must be set");

constructor(
address router,
bytes32 _donId
) FunctionsClient(router) ConfirmedOwner(msg.sender) {
require(_donId != "", "DON ID must be set");
donId = _donId;
}
/**
* @notice Set the DON ID
* @param newDonId New DON ID
*/
function setDonId(bytes32 newDonId) external onlyOwner {
donId = newDonId;
}

in the setDonId function don't check newDonId != "" so owner can set donId is empty.

Impact

Affecting the logic of the contract

Tools Used

Manual

Recommendations

Add check condition require(_donId != "", "DON ID must be set");

Updates

Lead Judging Commences

inallhonesty Lead Judge 3 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.