feat: enforce multisig threshold bounds validation#409
Merged
Baskarayelu merged 3 commits intoRemitwise-Org:mainfrom Mar 28, 2026
Merged
Conversation
- Add MIN_THRESHOLD (1), MAX_THRESHOLD (100), MAX_SIGNERS (100) constants - Implement comprehensive bounds validation in configure_multisig: - Reject empty signers list - Enforce threshold >= MIN_THRESHOLD - Enforce threshold <= MAX_THRESHOLD - Ensure threshold <= signer count - Validate all signers are family members - Verify spending limit >= 0 - Add 14 new tests for threshold validation edge cases - Update documentation with error codes and security notes - Fix duplicate constant in remitwise-common
uzochukwuV
commented
Mar 26, 2026
Contributor
Author
uzochukwuV
left a comment
There was a problem hiding this comment.
#289 pr submitted
…ate signer detection - Change configure_multisig return type from bool to Result<bool, Error> - Replace panic! calls with typed Error returns using existing error codes - Add DuplicateSigner and TooManySigners error variants - Enforce MAX_SIGNERS limit (was defined but unused) - Add duplicate signer detection in single-pass validation - Convert error tests to use try_configure_multisig for specific error assertions - Add 5 new tests: duplicate signer (x2), too many signers, threshold bounds - Update documentation with validation order and security assumptions Closes Remitwise-Org#289
Contributor
Author
|
close #289 |
Contributor
Author
|
Add MIN_THRESHOLD (1), MAX_THRESHOLD (100), MAX_SIGNERS (100) constants |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#289