Skip to content

fix: add role validation in reveal_attacker and reveal_defender#12

Closed
Slymeofthemonth wants to merge 1 commit intomainfrom
fix/issue-4-role-validation
Closed

fix: add role validation in reveal_attacker and reveal_defender#12
Slymeofthemonth wants to merge 1 commit intomainfrom
fix/issue-4-role-validation

Conversation

@Slymeofthemonth
Copy link
Owner

Closes #4

Problem: reveal_attacker and reveal_defender didn't verify the caller's role. Any player could call either function.

Fix:

  • reveal_attacker now asserts role == ROLE_ATK_A || role == ROLE_ATK_B
  • reveal_defender now asserts role == ROLE_DEF_A || role == ROLE_DEF_B

All 18 existing tests pass.

Closes #4

- reveal_attacker now asserts caller has ROLE_ATK_A or ROLE_ATK_B
- reveal_defender now asserts caller has ROLE_DEF_A or ROLE_DEF_B
@Slymeofthemonth
Copy link
Owner Author

Closing — this PR only contained the sozo upgrade (already merged in #13). The actual role validation fix for #4 was not implemented.

@Slymeofthemonth Slymeofthemonth deleted the fix/issue-4-role-validation branch March 4, 2026 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attacker role validation missing in reveal_attacker

1 participant