discourse/app/mailers
Dan Ungureanu fa8cd629f1
DEV: Hash tokens stored from email_tokens (#14493)
This commit adds token_hash and scopes columns to email_tokens table.
token_hash is a replacement for the token column to avoid storing email
tokens in plaintext as it can pose a security risk. The new scope column
ensures that email tokens cannot be used to perform a different action
than the one intended.

To sum up, this commit:

* Adds token_hash and scope to email_tokens

* Reuses code that schedules critical_user_email

* Refactors EmailToken.confirm and EmailToken.atomic_confirm methods

* Periodically cleans old, unconfirmed or expired email tokens
2021-11-25 09:34:39 +02:00
..
admin_confirmation_mailer.rb UX: show user email address on "grant admin access" email and UI 2019-11-04 14:47:00 +05:30
download_backup_mailer.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
group_smtp_mailer.rb FIX: Do not show recipient user in email participants list (#14642) 2021-10-19 15:26:22 +10:00
invite_mailer.rb DEV: Hash tokens stored from email_tokens (#14493) 2021-11-25 09:34:39 +02:00
rejection_mailer.rb DEV: Correct spelling mistakes in comments 2021-05-21 13:37:17 +10:00
subscription_mailer.rb FIX: Use correct URL for unsubscribe (#10077) 2020-06-24 09:31:20 +02:00
test_mailer.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00
user_notifications.rb FIX: Do not show recipient user in email participants list (#14642) 2021-10-19 15:26:22 +10:00
version_mailer.rb DEV: Upgrading Discourse to Zeitwerk (#8098) 2019-10-02 14:01:53 +10:00