diff --git a/appinfo/info.xml b/appinfo/info.xml
index d1668dd51b..6b28cba059 100644
--- a/appinfo/info.xml
+++ b/appinfo/info.xml
@@ -44,7 +44,7 @@ And in the works for the [coming versions](https://github.com/nextcloud/spreed/m
https://raw.githubusercontent.com/nextcloud/spreed/master/docs/contacts-menu.png
-
+
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index 4e31f8cb70..a19d83121e 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -147,17 +147,13 @@ class PageController extends Controller {
}
if ($requirePassword) {
- $passwordVerification = [
- 'result' => false,
- 'url' => ''
- ];
-
+
$passwordVerification = $room->verifyPassword($password);
if ($passwordVerification['result']) {
$this->session->setPasswordForRoom($token, $token);
} else {
- if ($passwordVerification['url'] == '') {
+ if ($passwordVerification['url'] === '') {
return new TemplateResponse($this->appName, 'authenticate', [], 'guest');
}
else {
@@ -210,7 +206,7 @@ class PageController extends Controller {
'result' => false,
'url' => ''
];
-
+
$passwordVerification = $room->verifyPassword($password);
if ($passwordVerification['result']) {
diff --git a/lib/Room.php b/lib/Room.php
index fb9c6fee77..cc8f5082df 100644
--- a/lib/Room.php
+++ b/lib/Room.php
@@ -574,7 +574,7 @@ class Room {
*/
public function joinRoomGuest($password, $passedPasswordProtection = false) {
$this->dispatcher->dispatch(self::class . '::preJoinRoomGuest', new GenericEvent($this));
-
+
if (!$passedPasswordProtection && !$this->verifyPassword($password)['result']) {
throw new InvalidPasswordException();
}
@@ -595,7 +595,7 @@ class Room {
return $sessionId;
}
-
+
/**
* @param string $sessionId
* @param bool $active
@@ -640,9 +640,12 @@ class Room {
$this->dispatcher->dispatch(self::class . '::verifyPassword', $event);
if ($event->hasArgument('result')) {
$result = $event->getArgument('result');
- return $result;
+ return [
+ 'result' => $result['result'] ?? false,
+ 'url' => $result['url'] ?? ''
+ ];
}
-
+
$passwordVerification = [
'result' => !$this->hasPassword() || $this->hasher->verify($password, $this->password),
'url' => ''