Skip to content

Commit

Permalink
Merge pull request from GHSA-wwgf-3xp7-cxj4
Browse files Browse the repository at this point in the history
Remove call to Topic::broadcast() if the dispatch method fails
  • Loading branch information
mbabker committed Jul 6, 2020
2 parents c357e3a + 8048314 commit 2d8dfd9
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Server/App/Dispatcher/TopicDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,7 @@ public function onUnSubscribe(ConnectionInterface $conn, Topic $topic, WampReque
*/
public function onPublish(ConnectionInterface $conn, Topic $topic, WampRequest $request, $event, array $exclude, array $eligible)
{
if (!$this->dispatch(self::PUBLISH, $conn, $topic, $request, $event, $exclude, $eligible)) {
//default behaviour is to broadcast to all.
$topic->broadcast($event);

return;
}
$this->dispatch(self::PUBLISH, $conn, $topic, $request, $event, $exclude, $eligible);
}

/**
Expand Down

0 comments on commit 2d8dfd9

Please sign in to comment.