{"action":"created","issue":{"url":"https://api.github.com/repos/loomnetwork/cryptozombie-lessons/issues/196","repository_url":"https://api.github.com/repos/loomnetwork/cryptozombie-lessons","labels_url":"https://api.github.com/repos/loomnetwork/cryptozombie-lessons/issues/196/labels{/name}","comments_url":"https://api.github.com/repos/loomnetwork/cryptozombie-lessons/issues/196/comments","events_url":"https://api.github.com/repos/loomnetwork/cryptozombie-lessons/issues/196/events","html_url":"https://github.com/loomnetwork/cryptozombie-lessons/issues/196","id":306215701,"number":196,"title":"A security hole!","user":{"login":"euglena","id":35580,"avatar_url":"https://avatars1.githubusercontent.com/u/35580?v=4","gravatar_id":"","url":"https://api.github.com/users/euglena","html_url":"https://github.com/euglena","followers_url":"https://api.github.com/users/euglena/followers","following_url":"https://api.github.com/users/euglena/following{/other_user}","gists_url":"https://api.github.com/users/euglena/gists{/gist_id}","starred_url":"https://api.github.com/users/euglena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euglena/subscriptions","organizations_url":"https://api.github.com/users/euglena/orgs","repos_url":"https://api.github.com/users/euglena/repos","events_url":"https://api.github.com/users/euglena/events{/privacy}","received_events_url":"https://api.github.com/users/euglena/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-18T05:56:23Z","updated_at":"2018-03-21T09:21:21Z","closed_at":null,"author_association":"NONE","body":"Hello Loom team,\r\nI like your course very much. Thanks. But I found a security hole in this code which could probably cause fatal problems in an application.\r\nLook at the code in Lesson 5 Chapter 8.\r\nImagine there are 3 persons: A, B and C. A owned a zombie. First, A approved that zombie to B, and then A transferred it to C in an exchange. What if B executed \"takeOwnership\" of the same zombie after that? Yes! He/she would succeed and got ownership of  it! And poor C lost his/her zombie without knowing why....\r\nWe should add some code to cancel the approval of the zombie in the same time it is transferred."},"comment":{"url":"https://api.github.com/repos/loomnetwork/cryptozombie-lessons/issues/comments/374875332","html_url":"https://github.com/loomnetwork/cryptozombie-lessons/issues/196#issuecomment-374875332","issue_url":"https://api.github.com/repos/loomnetwork/cryptozombie-lessons/issues/196","id":374875332,"user":{"login":"euglena","id":35580,"avatar_url":"https://avatars1.githubusercontent.com/u/35580?v=4","gravatar_id":"","url":"https://api.github.com/users/euglena","html_url":"https://github.com/euglena","followers_url":"https://api.github.com/users/euglena/followers","following_url":"https://api.github.com/users/euglena/following{/other_user}","gists_url":"https://api.github.com/users/euglena/gists{/gist_id}","starred_url":"https://api.github.com/users/euglena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/euglena/subscriptions","organizations_url":"https://api.github.com/users/euglena/orgs","repos_url":"https://api.github.com/users/euglena/repos","events_url":"https://api.github.com/users/euglena/events{/privacy}","received_events_url":"https://api.github.com/users/euglena/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T09:21:21Z","updated_at":"2018-03-21T09:21:21Z","author_association":"NONE","body":"I think it works just adding\r\ndelete zombieApprovals[_tokenId];\r\nin both transfer and takeOwnership."}}
{"actor":{"display_login":"euglena"}}