We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Github username: -- Twitter username: -- Submission hash (on-chain): 0xf98ccef9fe87ce0039b45e0f99fc036ca44aec603eb8b9c098d35e788625192f Severity: medium
Description: Description The registerGroup function reverts when called with empty _name or empty _symbol.
This is due to the below checks in the internal _registerGroup function:
Circles-0x6ca9ca24d78af44582951825bef9eadcb210e5cf/src/hub/Hub.sol
Lines 1017 to 1026 in 507e185
These functions return false due to nameBytes.length == 0
Circles-0x6ca9ca24d78af44582951825bef9eadcb210e5cf/src/names/NameRegistry.sol
Line 224 in 507e185
Thus the internal _registerGroup function will revert with CirclesInvalidString error
This behaviour differs from the intended functionality of defaulting name to "Circles-<base58(short)Name> when _name is left empty.
Line 117 in 507e185
This is a medium issue because it results in essential functionality of the contracts being temporarily unusable or inaccessible.
Recommendation Replace the
if (nameBytes.length > 32 || nameBytes.length == 0) return false; // Check length
condition in isValidName function with
if (nameBytes.length > 32 return false; // Check length
There is no need to return false on nameBytes.length == 0
The text was updated successfully, but these errors were encountered:
Groups must have a valid custom name, organizations do not.
Sorry, something went wrong.
No branches or pull requests
Github username: --
Twitter username: --
Submission hash (on-chain): 0xf98ccef9fe87ce0039b45e0f99fc036ca44aec603eb8b9c098d35e788625192f
Severity: medium
Description:
Description
The registerGroup function reverts when called with empty _name or empty _symbol.
This is due to the below checks in the internal _registerGroup function:
Circles-0x6ca9ca24d78af44582951825bef9eadcb210e5cf/src/hub/Hub.sol
Lines 1017 to 1026 in 507e185
These functions return false due to nameBytes.length == 0
Circles-0x6ca9ca24d78af44582951825bef9eadcb210e5cf/src/names/NameRegistry.sol
Line 224 in 507e185
Thus the internal _registerGroup function will revert with CirclesInvalidString error
This behaviour differs from the intended functionality of defaulting name to "Circles-<base58(short)Name> when _name is left empty.
Circles-0x6ca9ca24d78af44582951825bef9eadcb210e5cf/src/names/NameRegistry.sol
Line 117 in 507e185
This is a medium issue because it results in essential functionality of the contracts being temporarily unusable or inaccessible.
Recommendation
Replace the
condition in isValidName function with
There is no need to return false on nameBytes.length == 0
The text was updated successfully, but these errors were encountered: