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
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
Acceptance Criteria