diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-11-19 11:38:29 +0100 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-12-12 15:38:18 +0100 |
commit | dab953970dc9b9bd716f5e74c4c94a0dfeeddc6c (patch) | |
tree | 63e3468f8ab272d79de3c873944145b851ae7ff6 /lib/private/Share20 | |
parent | 2fa67bfd52f4fd1321aa0290ded7e336ceb0673b (diff) | |
download | nextcloud-server-dab953970dc9b9bd716f5e74c4c94a0dfeeddc6c.tar.gz nextcloud-server-dab953970dc9b9bd716f5e74c4c94a0dfeeddc6c.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/private/Share20')
-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 ce0dbd9b17a..600114449b8 100644 --- a/lib/private/Share20/Manager.php +++ b/lib/private/Share20/Manager.php @@ -97,7 +97,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) { @@ -110,11 +110,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)); } /** |