]> git.mxchange.org Git - hub.git/blobdiff - application/hub/main/nodes/class_BaseHubNode.php
true->TRUE, node id included in session id/private key generation
[hub.git] / application / hub / main / nodes / class_BaseHubNode.php
index 4156847bb09cd6c04f96043c88f5496bb50d4290..224fa481db6bc1ec2379a15cbf37238997de15b7 100644 (file)
@@ -115,8 +115,8 @@ class BaseHubNode extends BaseHubSystem implements Updateable, AddableCriteria {
         * @todo        Make this code more generic and move it to CryptoHelper or
         */
        protected function generateRamdomString ($length) {
-// Get an RNG instance
-$rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
+               // Get an RNG instance
+               $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
 
                // Generate a pseudo-random string
                $randomString = $rngInstance->randomString($length) . ':' . $this->getBootIpPort() . ':' . $this->getRequestInstance()->getRequestElement('mode');
@@ -317,6 +317,7 @@ $rngInstance = ObjectFactory::createObjectByConfiguredName('rng_class');
                // Search for the node number one which is hard-coded the default
                $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_NR  , 1);
                $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_MODE, $this->getRequestInstance()->getRequestElement('mode'));
+               $searchInstance->addCriteria(NodeInformationDatabaseWrapper::DB_COLUMN_NODE_ID  , $this->getNodeId());
                $searchInstance->setLimit(1);
 
                // Remember it for later usage