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

Operator Send does not use correct check #10

Closed
fulldecent opened this issue Sep 18, 2018 · 2 comments
Closed

Operator Send does not use correct check #10

fulldecent opened this issue Sep 18, 2018 · 2 comments

Comments

@fulldecent
Copy link
Member

fulldecent commented Sep 18, 2018

https://github.com/su-squares/ethereum-contract/blob/master/contracts/SuNFT.sol#L48

modifier canTransfer(uint256 _tokenId) {
    // assert(msg.sender != address(this))
    address owner = _tokenOwnerWithSubstitutions[_tokenId];
    require(msg.sender == owner ||
      msg.sender == tokenApprovals[_tokenId] ||
      operatorApprovals[msg.sender][msg.sender]);
    _;
}

should be

modifier canTransfer(uint256 _tokenId) {
    // assert(msg.sender != address(this))
    address owner = _tokenOwnerWithSubstitutions[_tokenId];
    require(msg.sender == owner ||
      msg.sender == tokenApprovals[_tokenId] ||
      operatorApprovals[owner][msg.sender]);
    _;
}
@fulldecent
Copy link
Member Author

Credit goes to dfinzer at OpenSea! Thanks for your help.

@fulldecent
Copy link
Member Author

Credit @dfinzer.

fulldecent added a commit that referenced this issue Oct 23, 2018
Signed-off-by: William Entriken <[email protected]>
fulldecent added a commit that referenced this issue Oct 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant