From: Roland Haeder Date: Thu, 3 Sep 2015 19:58:41 +0000 (+0200) Subject: Also check for empty hash here, too. X-Git-Url: https://git.mxchange.org/?p=hub.git;a=commitdiff_plain;h=234053a5dc5fbbab1c39d2f55615b5e656dbfd23 Also check for empty hash here, too. Signed-off-by: Roland Haeder --- diff --git a/application/hub/classes/package/class_NetworkPackage.php b/application/hub/classes/package/class_NetworkPackage.php index 3fdc59eed..bc471498e 100644 --- a/application/hub/classes/package/class_NetworkPackage.php +++ b/application/hub/classes/package/class_NetworkPackage.php @@ -360,6 +360,12 @@ class NetworkPackage extends BaseHubSystem implements Deliverable, Receivable, R //* NOISY-DEBUG */ self::createDebugInstance(__CLASS__)->debugOutput('NETWORK-PACKAGE[' . __METHOD__ . ':' . __LINE__ . ']: senderData=' . print_r($senderData, TRUE)); assert(isset($senderData[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH])); + // Don't accept empty hashes + if (empty($senderData[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH])) { + // Don't accept + die('[' . __METHOD__ . ':' . __LINE__ . ':] Empty private key hash: senderData=' . print_r($senderData, TRUE)); + } // END - if + // Return it return $senderData[NodeDistributedHashTableDatabaseWrapper::DB_COLUMN_PRIVATE_KEY_HASH]; } // END - if