more entropy on session id
all tests passing
This commit is contained in:
parent
29e22a0a2e
commit
705423e0b3
@ -17,7 +17,7 @@ class WampConnection extends AbstractConnectionDecorator {
|
|||||||
parent::__construct($conn);
|
parent::__construct($conn);
|
||||||
|
|
||||||
$this->WAMP = new \StdClass;
|
$this->WAMP = new \StdClass;
|
||||||
$this->WAMP->sessionId = uniqid();
|
$this->WAMP->sessionId = md5(uniqid(mt_rand(), true));
|
||||||
$this->WAMP->prefixes = array();
|
$this->WAMP->prefixes = array();
|
||||||
|
|
||||||
$this->send(json_encode(array(WAMP::MSG_WELCOME, $this->WAMP->sessionId, 1, \Ratchet\VERSION)));
|
$this->send(json_encode(array(WAMP::MSG_WELCOME, $this->WAMP->sessionId, 1, \Ratchet\VERSION)));
|
||||||
|
@ -81,7 +81,7 @@ class TopicTest extends \PHPUnit_Framework_TestCase {
|
|||||||
$topic->add($first);
|
$topic->add($first);
|
||||||
$topic->add($second);
|
$topic->add($second);
|
||||||
$topic->add($third);
|
$topic->add($third);
|
||||||
|
|
||||||
$topic->broadcast($msg, array($second->WAMP->sessionId));
|
$topic->broadcast($msg, array($second->WAMP->sessionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user