Repository navigation
A password lock emails the holder - #1419
Merged
Merged
Conversation
PasswordLockedNotifier declared no email delivery, and DigestMailerJob leaves security notifications out of the digest, so a lock produced only an in-app notice that the signed-out holder never sees, while the security guide said the holder is told by email. The notifier now delivers through NotificationMailer#password_locked, gated and throttled like the new-device alert, with HTML and text templates. A notifier spec drains Noticed's jobs and asserts the mail reaches the holder, under quiet hours too; the mailer spec and the AAA mail audit cover the template. The notifications guide listed the notifier twice; it lists it once.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The security guide says a locked holder "gets
PasswordLockedNotifierbyemail when the lock starts", and the sign-in page deliberately says nothing
about the lock (#1369). But the notifier declared no email delivery,
ApplicationNotifiersupplies none, andDigestMailerJobleaves securitynotifications out of the digest. A lock produced only an in-app notice,
which a signed-out holder never sees.
The notifier now delivers through
NotificationMailer#password_locked,with the same
deliver_email_now?gate,before_enqueueabort andper-recipient throttle as the new-device alert. HTML and text templates say
how long password sign-in is paused, that an emailed link or a passkey
still works, and link to sign-in. A suspended holder gets none, through the
mailer's existing gate.
spec/notifiers/password_locked_notifier_spec.rb(new) drains Noticed'sjobs and asserts the mail reaches the holder, and that it still does
under quiet hours.
notification_mailer_spec: heading, duration, sign-in link, throttle.mailers_axe_spec: the new mail passes the AAA audit.PasswordLockedNotifiertwice; once now.Not in this PR:
PasswordChangedNotifierhas the same gap. Thenotifications guide's example shows it with
deliver_by :email, but theclass has none, and there is no
NotificationMailer#password_changed.Found by Copilot's review of the MClassrooms sync
(lsa-mis#119).
Verify
specs with the AAA audit: 36 examples, 0 failures.
bin/parallel-rspec: 6054 examples, 0 failures.