add events to check passwords with the password policy app#221
add events to check passwords with the password policy app#221MorrisJobke merged 3 commits intomasterfrom
Conversation
|
Any need of a new hook over I'm fine with adding this one here as public API as well. But then the old one should die, it's non-public API anyways. |
I would like to have this new event as some kind of "public API" that other apps can check their passwords as well. This already speaks against a hook in the OC namespace. Further the symphony events have some advantages. E.g. the password checker can throw a exception and you can handle it outside of the hook, while the old hook system swallows all exception. Let's try to have clean implementations of new stuff. |
6fd0e4c to
95ababf
Compare
|
Ready to review. You need the password policy app to test it: nextcloud/password_policy#1 Password policy should be checked for public links and for the database backend password change in the user management and password change in the personal settings |
|
@schiessle Merge conflict 🙈 |
| \OC_JSON::error(); | ||
| } | ||
| } catch (HintException $e) { | ||
| return \OC_JSON::error(['data' => ['message' => $e->getHint()]]); |
There was a problem hiding this comment.
That's a void method. No return required.
95ababf to
79107ba
Compare
79107ba to
2a990a0
Compare
|
@LukasReschke merge conflict resolved. |
|
LGTM 👍 |
|
Tested and works 👍 |
|
Backport? cc @karlitschek |
|
please backport 👍 |
|
backport for 9.0.52 #240 |
Send "validate password events" to allow the password policy app (https://github.com/nextcloud/password_policy) to validate the password.