File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 3535use OCP \Security \Events \ValidatePasswordPolicyEvent ;
3636use OCP \Security \IHasher ;
3737use OCP \Security \ISecureRandom ;
38+ use OCP \Security \PasswordContext ;
3839use OCP \Share ;
3940use OCP \Share \Events \BeforeShareDeletedEvent ;
4041use OCP \Share \Events \ShareAcceptedEvent ;
@@ -116,7 +117,8 @@ protected function verifyPassword($password) {
116117
117118 // Let others verify the password
118119 try {
119- $ this ->dispatcher ->dispatchTyped (new ValidatePasswordPolicyEvent ($ password ));
120+ $ event = new ValidatePasswordPolicyEvent ($ password , PasswordContext::SHARING );
121+ $ this ->dispatcher ->dispatchTyped ($ event );
120122 } catch (HintException $ e ) {
121123 /* Wrap in a 400 bad request error */
122124 throw new HintException ($ e ->getMessage (), $ e ->getHint (), 400 , $ e );
You can’t perform that action at this time.
0 commit comments