Description
Multi‑sig proposals can be approved after their expires_at timestamp, which is a security issue.
Goal
Reject any approval attempt on an expired proposal before modifying the approvals list.
Tasks
- In the proposal
approve handler, fetch the proposal and immediately check if env.ledger().timestamp() > proposal.expires_at { return Err(EventError::ProposalExpired) }.
- Add a new error variant
ProposalExpired.
- Write a Rust test that creates a proposal with
expires_at in the past, then attempts to approve it and expects ProposalExpired.
Acceptance Criteria
Dependencies
Depends on: None
Blocks: None
Description
Multi‑sig proposals can be approved after their
expires_attimestamp, which is a security issue.Goal
Reject any approval attempt on an expired proposal before modifying the approvals list.
Tasks
approvehandler, fetch the proposal and immediately checkif env.ledger().timestamp() > proposal.expires_at { return Err(EventError::ProposalExpired) }.ProposalExpired.expires_atin the past, then attempts to approve it and expectsProposalExpired.Acceptance Criteria
ProposalExpiredand does not alter the approvals list.Dependencies
Depends on: None
Blocks: None