diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-20 14:39:58 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2020-11-24 20:59:54 +0300 |
commit | 88aa97a5f90cad4f74d0a986f5f1dc1aba4f3c8d (patch) | |
tree | 0c43e14a748f4cb5e0d85634254c4b1d3b94d33a /lib/PublicShareAuth | |
parent | b262d5f6e6b211f738d56964cf78ea817030709e (diff) |
Fix additional participants being able to join a password request room
This fixes a regression introduced in 4afa2d7946.
The active guests are only those who are currently in a call, and not
those who are currently in the conversation. Therefore other guests or
users were not prevented from joining a password request conversation if
a guest was in the conversation but not in the call.
Fortunately in practice this was not a problem, as the Web UI starts a
call immediately after joining the conversation, which made the guest
immediately active and thus prevented others from joining.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'lib/PublicShareAuth')
-rw-r--r-- | lib/PublicShareAuth/Listener.php | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/PublicShareAuth/Listener.php b/lib/PublicShareAuth/Listener.php index c029a5fc4..345b2c283 100644 --- a/lib/PublicShareAuth/Listener.php +++ b/lib/PublicShareAuth/Listener.php @@ -91,8 +91,7 @@ class Listener { } $participantService = \OC::$server->get(ParticipantService::class); - $users = $participantService->getParticipantUserIds($room); - if ($room->getActiveGuests() > 0 || \count($users) > 1) { + if ($participantService->getNumberOfActors($room) > 1) { throw new \OverflowException('Only the owner and another participant are allowed in rooms to request the password for a share'); } } @@ -112,8 +111,7 @@ class Listener { } $participantService = \OC::$server->get(ParticipantService::class); - $users = $participantService->getParticipantUserIds($room); - if ($room->getActiveGuests() > 0 || \count($users) > 1) { + if ($participantService->getNumberOfActors($room) > 1) { throw new \OverflowException('Only the owner and another participant are allowed in rooms to request the password for a share'); } } |