aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/Share20/Manager.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/Share20/Manager.php b/lib/private/Share20/Manager.php
index ea338937e2a..219f3d86380 100644
--- a/lib/private/Share20/Manager.php
+++ b/lib/private/Share20/Manager.php
@@ -112,7 +112,12 @@ class Manager implements IManager {
}
// Let others verify the password
- $this->dispatcher->dispatchTyped(new ValidatePasswordPolicyEvent($password));
+ try {
+ $this->dispatcher->dispatchTyped(new ValidatePasswordPolicyEvent($password));
+ } catch (HintException $e) {
+ /* Wrap in a 400 bad request error */
+ throw new HintException($e->getMessage(), $e->getHint(), 400, $e);
+ }
}
/**
@@ -780,7 +785,7 @@ class Manager implements IManager {
* @param IShare $share
* @return IShare The share object
* @throws \InvalidArgumentException
- * @throws GenericShareException
+ * @throws HintException
*/
public function updateShare(IShare $share, bool $onlyValid = true) {
$expirationDateUpdated = false;