aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2024-11-19 11:38:29 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2024-12-12 20:15:35 +0000
commit5ab079ed27a02084c500ec2794085ab606dd8da1 (patch)
tree0ff6d548ed89ef21562efbeccbbb7e15ecf4ce05
parent8ce499246f7145821b9e8f099bde12b1fbbe7187 (diff)
downloadnextcloud-server-5ab079ed27a02084c500ec2794085ab606dd8da1.tar.gz
nextcloud-server-5ab079ed27a02084c500ec2794085ab606dd8da1.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>
-rw-r--r--lib/private/Share20/Manager.php8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index bd35729cb3c..44dbe35cb9f 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -129,7 +129,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) {
@@ -142,11 +142,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));
}
/**