From 8927c55661f80070ce6ff0e04d621033ecfe2450 Mon Sep 17 00:00:00 2001 From: Haythem Sellami Date: Sat, 20 Apr 2019 14:52:33 +0100 Subject: [PATCH] should revert when update contributor account with address(0) --- apps/contributor/contracts/Contributor.sol | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/contributor/contracts/Contributor.sol b/apps/contributor/contracts/Contributor.sol index e9a6271..3ab9011 100644 --- a/apps/contributor/contracts/Contributor.sol +++ b/apps/contributor/contracts/Contributor.sol @@ -54,6 +54,7 @@ contract Contributor is AragonApp { } function updateContributorAccount(uint32 id, address oldAccount, address newAccount) public auth(MANAGE_CONTRIBUTORS_ROLE) { + require(newAccount != address(0), "invalid new account address"); require(getContributorAddressById(id) == oldAccount, "contributor does not exist"); contributorIds[oldAccount] = 0;