mirror of
https://github.com/nextcloud/server.git
synced 2026-10-07 19:51:40 +02:00
Emit BeforePasswordResetEvent before setting the password and PasswordResetEvent only after the password change succeeds. Emitting these events is the correct lifecycle behavior and lets server-side encryption use its reset flow instead of treating the CLI operation as a normal password change, matching the web-based lost-password flow. Because this command does not provide an encryption recovery password, existing encrypted files may become inaccessible after the reset. The interactive CLI and web flow warn about this; the --password-from-env path does not, which is existing behavior. Fixes #51235 Signed-off-by: Josh <josh.t.richards@gmail.com>