From 900007d693c764cfe180e1f8911d1164530b879f 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 4dadcdbfcd7f4..ea338937e2a72 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -99,7 +99,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) { @@ -112,11 +112,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)); } /**