diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-11-19 11:38:29 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-12-12 15:39:48 +0100 |
commit | 28d7206e5cab68eb4b4a012574ee26275e2c74d8 (patch) | |
tree | 3e02d4e133ff1c59a15b59a7c4e5f2250bf5077b /lib | |
parent | cba556d641d07218916e97be3e94d17cad0406fb (diff) | |
download | nextcloud-server-28d7206e5cab68eb4b4a012574ee26275e2c74d8.tar.gz nextcloud-server-28d7206e5cab68eb4b4a012574ee26275e2c74d8.zip |
fix(files_sharing): Do not wrap password policy exception into a generic one
Let the controller access the HintException and show the error to the user.
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Share20/Manager.php | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php index 4dadcdbfcd7..ea338937e2a 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -99,7 +99,7 @@ class Manager implements IManager { * 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 @@ class Manager implements IManager { } // 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)); } /** |