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

rescueLostKitty can be replaced with a check #5

Open
Arachnid opened this issue Nov 16, 2017 · 2 comments
Open

rescueLostKitty can be replaced with a check #5

Arachnid opened this issue Nov 16, 2017 · 2 comments

Comments

@Arachnid
Copy link

Description

rescueLostKitty exists to restore ownership of kitties accidentally transferred to the token contract itself. This can be replaced by a simple check on transfer that prevents this happening in the first place.

Scenario

  1. User transfers a kitty to the token contract
  2. rescueLostKitty is called.

Impact

Some inconvenience for the user and for the maintainers of the contract.

Reproduction

See Scenario.

Fix

Add a check require(to != address(this)) in the transfer function.

@dete
Copy link

dete commented Nov 16, 2017

facepalm

Thanks, @Arachnid! (I may be embarrassed, but I'm still grateful!)

@kimcope
Copy link
Contributor

kimcope commented Nov 21, 2017

Thanks for your participation, @Arachnid! Our team has reviewed your submission, and we are pleased to reward you for your report.

Impact: Low
Likelihood: Low
Points: 50

Please see the final leaderboard here.

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

No branches or pull requests

5 participants