diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-07-12 07:50:38 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2018-08-08 11:24:49 +0300 |
commit | 94b4a185056e3969b1962b1b2854bf7cb24e939f (patch) | |
tree | db82da5d7e8274d59e7e07219022e12af3f6027e /lib/Room.php | |
parent | 7dfcbe2c5aa6168b4c235f73ade54d7d2f47e0b9 (diff) |
Prevent extra participants from joining a "share:password" room
The rooms to request the password for a share are public rooms, so
anyone could join them provided she knows its token. Thus, now it is
enforced that only a single participant besides the owner can join the
room.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/Room.php')
-rw-r--r-- | lib/Room.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Room.php b/lib/Room.php index daedaddc9..9a50726c9 100644 --- a/lib/Room.php +++ b/lib/Room.php @@ -572,7 +572,9 @@ class Room { * @throws InvalidPasswordException */ public function joinRoom($userId, $password, $passedPasswordProtection = false) { - $this->dispatcher->dispatch(self::class . '::preJoinRoom', new GenericEvent($this)); + $this->dispatcher->dispatch(self::class . '::preJoinRoom', new GenericEvent($this, [ + 'userId' => $userId, + ])); $query = $this->db->getQueryBuilder(); $query->update('talk_participants') |