From 67d5cb3cb8479a16cd63c9c1e2d65929b7b6d1d9 Mon Sep 17 00:00:00 2001 From: Eduardo Morales Date: Mon, 18 Dec 2023 12:03:46 -0600 Subject: [PATCH] fix(manager): removed dead code Signed-off-by: Eduardo Morales --- lib/private/Share20/Manager.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 0188c0897d9d3..31f3924f05381 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1573,14 +1573,8 @@ protected function checkShare(IShare $share): void { * @return bool */ public function checkPassword(IShare $share, $password) { - $passwordProtected = $share->getShareType() !== IShare::TYPE_LINK - || $share->getShareType() !== IShare::TYPE_EMAIL - || $share->getShareType() !== IShare::TYPE_CIRCLE; - if (!$passwordProtected) { - //TODO maybe exception? - return false; - } + // if there is no password on the share object / passsword is null, there is nothing to check if ($password === null || $share->getPassword() === null) { return false; }