From ef33af9ea5c26b6196ba9d3d8b00b706af06631f Mon Sep 17 00:00:00 2001 From: Ricardo Guilherme Schmidt <3esmit@gmail.com> Date: Thu, 30 Aug 2018 09:55:33 -0300 Subject: [PATCH] slashing condition subdomain "like address" hardened --- contracts/registry/ENSSubdomainRegistry.sol | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/contracts/registry/ENSSubdomainRegistry.sol b/contracts/registry/ENSSubdomainRegistry.sol index bf28692..b15c343 100644 --- a/contracts/registry/ENSSubdomainRegistry.sol +++ b/contracts/registry/ENSSubdomainRegistry.sol @@ -207,13 +207,9 @@ contract ENSSubdomainRegistry is Controlled { external { bytes memory subdomain = bytes(_subdomain); - require(subdomain.length > 7, "Too small to look like an address."); + require(subdomain.length > 12, "Too small to look like an address."); require(subdomain[0] == byte("0"), "First character need to be 0"); require(subdomain[1] == byte("x"), "Second character need to be x"); - for(uint i = 2; i < 7; i++){ - byte b = subdomain[i]; - require((b >= 48 && b <= 57) || (b >= 97 && b <= 102), "Does not look like an address"); - } slashSubdomain(subdomain, _domainHash); }