Skip to content
New issue

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

Social Recovery Module (Develop) - Logic Error #110

Open
4NNNN opened this issue Aug 22, 2023 · 0 comments
Open

Social Recovery Module (Develop) - Logic Error #110

4NNNN opened this issue Aug 22, 2023 · 0 comments

Comments

@4NNNN
Copy link

4NNNN commented Aug 22, 2023

function _init(bytes calldata data) internal override {
(address[] memory _guardians, uint256 _threshold, bytes32 _guardianHash) =
abi.decode(data, (address[], uint256, bytes32));
address _sender = sender();
require(_threshold > 0 && _threshold <= _guardians.length, "threshold error");
if (_guardians.length > 0) {
require(_guardianHash == bytes32(0), "cannot set anonomous guardian with onchain guardian");
}
if (_guardians.length == 0) {
require(_guardianHash != bytes32(0), "guardian config error");
}
for (uint256 i = 0; i < _guardians.length; i++) {
walletGuardian[_sender].guardians.add(_guardians[i]);
}
walletGuardian[_sender].guardianHash = _guardianHash;
walletGuardian[_sender].threshold = _threshold;
walletInitSeed[_sender] = _newSeed();
}

There's a threshold error when, implementing the anon flow for setting up the anon guardian recovery module. Well seems like it's a logic error where if the inputs for the guardian hash are provided with threshold and owners being zero. Either way the threshold has to be greater than 0, well neglecting the flow of anon guardianhash recovery !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant