From: Eduardo Morales Date: Mon, 18 Dec 2023 18:03:46 +0000 (-0600) Subject: fix(manager): removed dead code X-Git-Tag: v29.0.0beta1~621^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F42361%2Fhead;p=nextcloud-server.git fix(manager): removed dead code Signed-off-by: Eduardo Morales --- diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 0188c0897d9..31f3924f053 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -1573,14 +1573,8 @@ class Manager implements IManager { * @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; }