Skip to content

CONTRACT: Add proposal expiry guard & test #953

Description

@OSEH-svg

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

  1. In the proposal approve handler, fetch the proposal and immediately check if env.ledger().timestamp() > proposal.expires_at { return Err(EventError::ProposalExpired) }.
  2. Add a new error variant ProposalExpired.
  3. 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

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions