Skip to content

Fix pending invite validation logic #20

Description

@Gianfranco99

Description

The pending invite validation function has a logical issue that could allow unauthorized invite acceptances.

Problem

The validation logic currently accepts rank ID 0 under certain conditions, but rank 0 is reserved for guild creators and should never be used for regular invites.

Proposed Solution

Simplify the validation to always reject rank 0 for pending invites and add proper rank existence verification.

Files to Update

  • src/guild/component.cairo

Acceptance Criteria

  • Validation never allows rank 0 for invites
  • Proper rank existence validation added
  • Edge cases covered with tests

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions