Network controller cleanup and an extra sanity check.

This commit is contained in:
Adam Ierymenko 2015-05-15 09:32:10 -07:00
parent 0bdd56ebd6
commit f693d4d0c8
2 changed files with 4 additions and 42 deletions

View file

@ -243,6 +243,10 @@ NetworkController::ResultCode SqliteNetworkController::doNetworkConfigRequest(co
netconf["error"] = "signing identity invalid or lacks private key";
return NetworkController::NETCONF_QUERY_INTERNAL_SERVER_ERROR;
}
if (signingId.address().toInt() != (nwid >> 24)) {
netconf["error"] = "signing identity address does not match most significant 40 bits of network ID";
return NetworkController::NETCONF_QUERY_INTERNAL_SERVER_ERROR;
}
NetworkRecord network;
memset(&network,0,sizeof(network));