Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(story-badge): prevent signature replay in StoryBadgeNFT minting #182

Merged
merged 1 commit into from
Feb 12, 2025

Conversation

sebsadface
Copy link
Member

Description

This PR addresses a security vulnerability in the StoryBadgeNFT contract where signatures could be reused across different organizations' StoryBadgeNFT contracts if they share the same signer address. The fix modifies the signature digest in StoryBadgeNFT.sol to include both the recipient's address (msg.sender) and the contract address (address(this)), preventing signature replay attacks between different StoryBadgeNFT contracts.

Changes

  • Modified signature digest to include contract address in StoryBadgeNFT.sol
  • Updated test helper _signAddress() to support new signature format
  • Updated all affected tests

@sebsadface sebsadface merged commit ca26a84 into storyprotocol:main Feb 12, 2025
10 checks passed
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.

2 participants