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

Comments

1 participant
@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

This comment has been minimized.

Copy link
Member

fulldecent commented Sep 18, 2018

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

@fulldecent

This comment has been minimized.

Copy link
Member

fulldecent commented Oct 23, 2018

Credit @dfinzer.

fulldecent added a commit that referenced this issue Oct 23, 2018

Check operator permissions, fixes #10
Signed-off-by: William Entriken <github.com@phor.net>

fulldecent added a commit that referenced this issue Oct 23, 2018

Merge pull request #17 from su-squares/fix-operator-send
Check operator permissions, fixes #10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment