Fix/harden input validation human readable identifiers#650
Merged
Jagadeeshftw merged 7 commits intoJagadeeshftw:masterfrom Feb 26, 2026
Conversation
- Add validation module with length and character restrictions - Validate program IDs, names, types, tags, and metadata fields - Prevent control characters and extremely long strings - Apply consistent validation across program and bounty escrow contracts - Add comprehensive tests for valid and invalid inputs Closes Jagadeeshftw#608
|
@Obiajulu-gif is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
- Replace std::panic::catch_unwind with #[should_panic] attributes - Use proper Soroban testing patterns for validation tests - Fix function call to use get_program_info instead of non-existent get_program_data This should resolve CI compilation issues with no_std environment.
- Add consistent input validation for bounty types and metadata - Prepare for future EscrowMetadata validation - Maintain consistency across all contracts
Owner
|
please resolve the conflicts |
Contributor
Author
|
@Jagadeeshftw I have resolved it |
Owner
|
please resolve the conflicts |
Contributor
Author
|
@Jagadeeshftw merge my code |
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.
This pull request introduces several important improvements across the contracts and their tests, focusing on enhanced configuration management, input validation, and pause/emergency functionality. The changes add robust snapshot and rollback documentation, stricter input validation in program metadata, and new pause/emergency withdrawal tests for contract safety. Additionally, the multisig configuration is improved for easier state management and debugging.
Configuration Management & Recovery:
CONFIGURATION_SNAPSHOTS_ROLLBACK.mddocumentation detailing on-chain configuration snapshot and rollback capabilities forprogram-escrowandgrainlify-core, including retention, workflow, contract methods, and admin-only authorization.grainlify-core/src/multisig.rsfor getting, setting, and clearing multisig config, supporting controlled restore operations and improving contract state management.Input Validation:
program-escrow/src/test_metadata_tagging.rs, ensuring proper error handling for empty, overly long IDs, and invalid metadata tags.Pause & Emergency Functionality:
bounty_escrow/contracts/escrow/src/test_bounty_escrow.rsfor pause/unpause functionality and emergency withdrawal, ensuring contract safety and correct pause state behavior.Code Quality & Debugging:
MultiSigConfigstruct ingrainlify-core/src/multisig.rswithDebug,Eq, andPartialEqtraits for easier debugging and test assertions.Subproject Update:
grainlifysubproject to commitc1d13d606bff2190e9c64090d6d6bd6c780278f3.Closes #608