You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the bug?
In the setStorageRegistry function, the contract updates the storageRegistry address without performing a validity check (i.e., whether the _storageRegistry address is a valid contract implementing the IStorageRegistry interface). If a non-contract address or a contract with a different interface is passed, this could lead to undefined behavior or loss of functionality.
fix: Add a check to ensure _storageRegistry is a valid contract that supports the IStorageRegistry interface using this.
require(Address.isContract(_storageRegistry), "Not a valid contract");
Nb: Adding this check improves contract robustness and prevents the contract from breaking due to incorrect registry addresses.
The text was updated successfully, but these errors were encountered:
What is the bug?
In the setStorageRegistry function, the contract updates the storageRegistry address without performing a validity check (i.e., whether the _storageRegistry address is a valid contract implementing the IStorageRegistry interface). If a non-contract address or a contract with a different interface is passed, this could lead to undefined behavior or loss of functionality.
fix: Add a check to ensure _storageRegistry is a valid contract that supports the IStorageRegistry interface using this.
require(Address.isContract(_storageRegistry), "Not a valid contract");
Nb: Adding this check improves contract robustness and prevents the contract from breaking due to incorrect registry addresses.
The text was updated successfully, but these errors were encountered: