fix(files_sharing): Do not wrap password policy exception into a generic one#49366
fix(files_sharing): Do not wrap password policy exception into a generic one#49366
Conversation
lib/private/Share20/Manager.php
Outdated
| } catch (HintException $e) { | ||
| throw new \Exception($e->getHint()); | ||
| } | ||
| $this->dispatcher->dispatchTyped(new ValidatePasswordPolicyEvent($password)); |
There was a problem hiding this comment.
Still disappointed that this is done using exceptions rather than setting property on the even like isValid...
tobiasKaminsky
left a comment
There was a problem hiding this comment.
Unfortunately this does not fix it
I’m out of ideas |
|
Do you need more info how to reproduce it? |
Do you have a full stacktrace for the Exception? (with this PR applied on server side) |
d0beeed to
900007d
Compare
|
@tobiasKaminsky Can you test again? It should be good now, message should be back and error code should be 400. |
|
This works now without any modification on client side 🎉 |
|
@come-nc can we merge this? 💙 |
…ric one Let the controller access the HintException and show the error to the user. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This fixes a regression that bad password returned 403 instead of 400 because of previous changes. Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
cca3072 to
365ff40
Compare
Follow-up of #49361
Summary
Let the controller access the HintException and show the error to the user.
Checklist