From d0beeedc7395a21bfbbc38961f385497706f584e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 19 Nov 2024 11:38:29 +0100 Subject: [PATCH] fix(files_sharing): Do not wrap password policy exception into a generic one MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let the controller access the HintException and show the error to the user. Signed-off-by: Côme Chilliet --- lib/private/Share20/Manager.php | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 4856c051307a9..b976215ccb5df 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -98,7 +98,7 @@ private function splitFullId($id) { * Verify if a password meets all requirements * * @param string $password - * @throws \Exception + * @throws HintException */ protected function verifyPassword($password) { if ($password === null) { @@ -111,11 +111,7 @@ protected function verifyPassword($password) { } // Let others verify the password - try { - $this->dispatcher->dispatchTyped(new ValidatePasswordPolicyEvent($password)); - } catch (HintException $e) { - throw new \Exception($e->getHint()); - } + $this->dispatcher->dispatchTyped(new ValidatePasswordPolicyEvent($password)); } /**